Moving Resource class to module level to make it serializable.

Reviewed in https://codereview.appspot.com/6610049/.
3 files changed