Scale memory and disk cache sizes.

Memory cache now has a ceiling of 20MB. Also fixes a logic error for looking up the large memory class when the large heap flag was set.

Disk cache now scales between 5MB and 50MB, favoring 2% of the storage space on the target filesystem.

Closes #4.

@swankjesse @dnkoutso