refactor(account): externalize state

TODO: username and events
chore(merge): new events
refactor(account): expose scoped EventEmitter to the state
refactor(account): use state for events
refactor(account): use state for username
refactor(account): split public and private functions
refactor(account): dynamically expose all methods in api
Merge pull request #350 from hoodiehq/refactor_account

Refactor account