Add resource state helpers

Helps promote "stateless" data API (sent as JSON over wire or to HTML
rendering engine, e.g. Mustache).