Added lifecycle methods.

Added lifecycle methods and pack them to JsFunctions with stuff needed
to emulate real functionality.
setState private vars, documentation

Component edited to use private vars to maintain sate and basic comments added.
Tests added

Updated test to use all lifecycle methods
Syntax edited.
Merge pull request #8 from cleandart/lifecycle

Added lifecycle methods.