py: Implement staticmethod and classmethod (internally).

Still need to make built-ins by these names, and write tests.