Unified multiple definitions of container_of() macro.

Removed duplicate definitions of the container_of() macro and
refactored sources to use the single implementation.

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/src/animation.c b/src/animation.c
index 4b69bdd..cc7482d 100644
--- a/src/animation.c
+++ b/src/animation.c
@@ -34,6 +34,7 @@
 #include <fcntl.h>
 
 #include "compositor.h"
+#include "shared/helpers.h"
 
 WL_EXPORT void
 weston_spring_init(struct weston_spring *spring,