Fix overzealous search and replace
Cache permissions
Add UDF definitions to instance adjuncts cache

This integrates the UDF cache with the instance "adjuncts" cache, which means that changes to UDF definitions will be recognized on all servers.

Fixes #1364
Invalidate cache when objects are deleted
When showing a user's own edits, don't worry about visibility

Showing a user's edits is complex because we check (for each instance, for each model) which fields the viewing user has permission to see. That results in an immense SQL statement.  But a user should be able to see all their own edits, so we can simplify that case (which is also the common case).

In addition we can simplify the giant query by excluding UDF bookkeeping fields once rather than once for each instance/model pair.
Add 'log' decorator for debugging
Add creates_instance_user to api endpoints

API endpoints that modify stuff need to automatically create an instance
user. This fixes a crash, reported here:
https://github.com/OpenTreeMap/OpenTreeMap-Android/issues/98
Fix lint and respond to comments
Merge pull request #1459 from RickMohr/speed-ups

Reduce database queries on slow pages
Merge pull request #1458 from steventlamb/topic/add_log_decorator

Topic/add log decorator
Merge pull request #1461 from steventlamb/topic/auto_create_iuser_for_api

Topic/auto create iuser for api
Revert changes -- one incorrect and one unnecessary
Hide add photo section in public profile
Hide privatized fields in public profile
Merge pull request #1462 from steventlamb/bug/fix_profile_visibility

Bug/fix profile visibility
Fix mistake
Merge branch 'master' of github.com:OpenTreeMap/OTM2
Refactor user functions to lib package
Merge pull request #1453 from steventlamb/topic/refactor_user_functions_to_lib

Refactor user functions to lib package
Bump up selenium version

Needed to stay in sync with Firefox. This is going to be required
periodically until we switch to using an non-auto-updating version of
firefox, like iceweasel.