Fix SQLi in admin and members reports/edit controllers #645

* Previously the incident id was not sanitized before being used in
  the geometry query.
Fix SQL injection in admin/messages/reporters #653
Remove debug statement #647
Fix changes from ad35e3c to work with jspacker #447

Needed ; after anonymous function declarations.
Escape html specialchars in title tags #536

This is related to an XSS error found during FLOSSHack. HTML tags could
be inserted into the page title tag.
Fix SQLi in location api #654

* Removes Location_MOdel::get_locations since it better to use ORM
* Filter locations by location_visible
* Sanitize location id (automatic thanks to query builder/ORM)
* Slight change to JSON response, but should be backwards compatible
  * Now returns lat/long/id as numbers not strings
  * Now return name and location_name
  * Response now includes location_date
Escape html specialchars in title tags #536

This is related to an XSS error found during FLOSSHack. HTML tags could
be inserted into the page title tag.
Fix SQLi in location api #654

* Removes Location_MOdel::get_locations since it better to use ORM
* Filter locations by location_visible
* Sanitize location id (automatic thanks to query builder/ORM)
* Slight change to JSON response, but should be backwards compatible
  * Now returns lat/long/id as numbers not strings
  * Now return name and location_name
  * Response now includes location_date
Fix SQL injection in admin/messages/reporters #653
Merge branch 'v2.5b' into develop
Removing api keys API task #610

* not used by mobile apps and seems like a weird thing to have
* Removing it as it has potential security issues
Remove Snoopy library #610

* No longer used by the upgrader
* Contains potential command and option injections (ie. lets a hacker
  run anything the like at a command line)
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.
Fix SQLi in MY_Checkin_Api_Object.php #645

Parameterize query to check if user email exists
Fix SQLi in MY_Countries_Api_Object.php #645

Converted _get_countries function to use the ORM instead so queries
are sanitized automatically. This adds some extra fields to the response
but existing fields are unchanged.
Use default value if password_length config is empty #558

This is to avoid the following PHP error when creating users:
application/libraries/Validation.php [570]:
call_user_func() expects parameter 1 to be a valid callback, function 'length[]' not found or invalid function name
Don't allow reports via API when disabled via web #661

* Check allow_reports setting in Report API
* Also fix PHP errors when missing person params from API request
Require authentication on admin bits of comments api #650

* Require auth on comment actions
* Require auth to list pending/unapproved/spam comments
Merge branch 'v2.5b' into develop