Fixed Bug 892209 - Create Pub/Sub (Observer API) in shared/js

Added Pub/Sub API (EventEmitter object) in shared/js/event_emitter.js
Added tests for EventEmitter in apps/gallery/test/unit/event_emitter_test.js

Link to Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=892209