Reduce memory consumption.

Biggest difference seems to be made by making ItemId not store both the decimal
and Atom forms (both as strings). Instead store only a numeric form (as a long),
and synthesize the other forms as needed.

Also moves more things into functions so that temporary data structures can be
GCed.

Brings RSIZE for my account from ~680M to ~391M (which seems to be holding
steady as items are fetched).

For #6