Update component documentation.

Add documentation related to the new initialize() event, and also inline the API docs into a section. I've also removed the API section as it had nothing in it once the callbacks were moved.

I've also tried to make the examples clearer by including comments for different functions context.
We can use a different example component name if that would feel better.