adds primary_key and has_id_property? methods

This gives an easy way to determine whether a class has IdProperty enabled and figure out what that method should be.