changed jst.define() to jst.nameSpace

changed jst.define() to jst.nameSpace, added Promises (jst.async), added
tests for Promises and Pubsub implementations