Add offset to resources and switch to length.

This adds an offset field to the resources structure and also switches from "size" to "length" to be consistent with names used in rich_signature.