Moved helper macro to a discrete include file.

To help reduce code duplication and also 'kitchen-sink' includes
the ARRAY_LENGTH macro was moved to a stand-alone file and
referenced from the sources consuming it. Other macros will be
added in subsequent passes.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/shared/cairo-util.c b/shared/cairo-util.c
index f6d02a8..21fcbea 100644
--- a/shared/cairo-util.c
+++ b/shared/cairo-util.c
@@ -35,11 +35,10 @@
 #include <cairo.h>
 #include "cairo-util.h"
 
+#include "shared/helpers.h"
 #include "image-loader.h"
 #include "config-parser.h"
 
-#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
-
 void
 surface_flush_device(cairo_surface_t *surface)
 {