Fix ability to sort by case owner

http://manage.dimagi.com/default.asp?121159

best reviewed commit by commit.
not a big deal, but the underscore in `[\w_-]` is redundant since it's already matched by `\w`