Make methods in class Mock private, move publish.mock into class Mock.
Rename prototype_has_method() to is_method_in_prototype().