Properly handle parent/child fields

Support sorting by parent/child or indicator:name/field properties. http://manage.dimagi.com/default.asp?69728