Custom control framework

This PR aims to create a framework for custom controls. This is based on the [discussion](https://groups.google.com/forum/?fromgroups=#!topic/ol3-dev/pAlnkanZ0h) that took place on the ol3-dev list.