Breakup kibana controller

Move the Kibana controller into the plugin directory, clean up some cruft, add more tests.

Waiting to merge #1942 before review.