properly lock down APIs by role

for users, web users and apps, the role was clear

for cases and forms, currently requiring edit data permission, though
we may want to consider breaking this out to new permissions
whitespace
cleanup
actually make domain admin authorization work
remove printout
remove unused duplicate download params
fix text for case export heading
Revert "default to csv for custom case export downloads"

This reverts commit 19a82abaf9e8568f63fabb1b47e05c63084e339e.
restore old functionality of custom exports honoring their default format
add post-checkout git-hook to delete .pyc files

this is a common source of confusion when trying to reproduce
an error on another branch
Merge pull request #2638 from dimagi/default-csv

csv export fixes
Merge pull request #2640 from dimagi/bill-processed-sms

create billables for outgoing SMSs only if processed
Revert "create billables for outgoing SMSs only if processed"

This reverts commit fca86553a30a043c6bd8bf47aebeb5593fa3d73a.
Merge pull request #2643 from dimagi/revert-billable-change

Revert "create billables for outgoing SMSs only if processed"
Merge pull request #2639 from dimagi/delete-pyc-hook

add post-checkout git-hook to delete .pyc files
update submodules
Merge pull request #2636 from dimagi/api-permissions

properly lock down APIs by role
bill SMSs after processing