Separate spec cache directory for each Ruby version
Fix error `singleton can't be dumped (TypeError)` on dynamic analysis

Use JSON rather than Marshal to serialize dynamic analysis data.

This fixes #17.