Merge pull request #832 from stevenolen/master

catch additional exception, closes #831
Revert "catch additional exception, closes #831"
Merge pull request #834 from ohmage/revert-832-master

Revert "catch additional exception, closes #831"
Merge pull request #837 from ohmage/ohmage-2.16

merge recent 2.16 updates to master
Merge pull request #842 from ohmage/ohmage-2.16

allow application/x-www-form-urlencoded for campaign/update. fixes #646,...
read activation function from preferences table. fixes #847
better handle activation function for backwards compatability. #847
make sql init script idempotent
weirdly, this is not in master, but in ohmage 2.16?
Merge pull request #1 from stevenolen/master

merging master to ohmage-2.16 since ohmage project prefers commits to the version branch