Fix ability to sort by case owner

http://manage.dimagi.com/default.asp?121159

best reviewed commit by commit.
In KO the scope is populated with both globals and with the current template context, which in this case is a `SortRow`. `fieldHtml` is defined on `SortRow` above.