Add focus api

This adds the api needed to customize widget focus behavior. It adds functions for customizing focus traversal order, listening for focus in and out events, and setting the focus policy of a widget.