Fix implementation of custom container view controller

The right order to insert a child view controller is to first call the method
addChildViewController, then addSubview, and finally didMoveToParentViewController.
This fixes some issues where some events were not being passed to the
child controllers.
Merge Fix implementation of custom container view controller, from Gabriel Reis.
Merge PR #20. Thanks @greis.