Use name attribute for resources and resource fields.

This fixes #8 in github's issue tracker.
Version 0.2.1.

We now support the standard name attribute (instead of the old deprecated id version).