fix an annoying abstraction violation in uth

this also wasn't using locking correctly: it never released the locks
Allow xls uploaders to assign cases via user name, not just id
[wip] default to using basic authentication for secure submissions
add function to guess a phone's type by user agent + test
change default auth type based on user agent headers
owner_name now behaves just like owner_id. Also improved error message for bad owner_names
add ability to copy postgres data (commtrack for now) as part of copy_domain
Fixed potential NameError
Merge pull request #3985 from dimagi/owner_name-in-case-exporter

Allow users to specify owner names (not just ids) in excel case importer
update staging.yaml

[ci skip]
Fixed broken url lookup on form template for special 'User Registration' form
Merge pull request #3991 from dimagi/view-user-reg-error

Fixed broken url reverse on form template for special "User Registration" form
Use a list instead of a tuple to support item assignment
use proper filters in pact
Merge pull request #3992 from dimagi/127375

Fix reports bug
fix shared array reference in lcs-merge for case list issue
Merge pull request #3993 from dimagi/pact-again

use proper filters in pact
fix another pact 500

http://manage.dimagi.com/default.asp?127020
Merge pull request #3994 from dimagi/pact-again

fix another pact 500
add a test case for lcsMerge

it is not linked into any automated framework
but will be a helpful regression test for anyone who touches this