API: add ClassInfo::table_for_object_field to return table name for given field in class hierarchy.

This raised itself while fixing issues with sorting grid fields with a field from a subclass.