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