Safer optimization for User_Model::has_permission() #948

* Avoids breaking tests
* Just caches the repeated query, not the permission check
Reworking /admin/reports to reduce repeat queries

* Don't reload incidents through ORM
* Load user id with fetch incidents
* Don't try and load translations
* Don't load countries
* Load verify records with user
Split category::get_category_tree_view for better reuse #594

* Split category::get_category_tree_view() into category::get_category_tree_data()
Optimize category tree in forms #594

* Remove sql in a loop getting category parents
* Share code with frontend category tree filters
* Rename category::tree() to category::form_tree()
* Localize category description in admin.
Graceful handling of orphaned categories #594

* Fix for changes from #594
* Previously orphaned categories caused a PHP error and didn't appear
  on the manage screen
Fix category sorting in admin and frontend #810
category::form_tree() UI improvements #871

* Wrap category form tree checkboxes in labels
* Use classes not IDs on category tree ULs
  This makes more sense since we can have more than 1 of these per page.
  Also adding a general class to make it easier to bind treeview
Escape html entites in category titles in tree #859
Remove NONE category #607

* Delete the NONE category
* Delete associated incident_category records
* Remove all filters category 5/NONE
* Clean up orphan reports handling on category delete
* Remove cascade delete handling to category model
Fix category tree view in uchaguzi themes
Fix styling on category treeview
Merge pull request #161 from rjmackay/master

Optimize /admin/reports and port category improvements / optimization from core