Add get_fields method to orm.Entity

Also add orm.is_entity helper function