Add getter macros for attributes (#1931)

See #1931

I have a branch with a simple testcase [here](https://github.com/Manishearth/servo/compare/getters-1931...getter-testcase). The testcase branch is based on this branch, so just checking it out should work.