memoize json_dump and json_load
Memoize branch history, and in the process fix a bug that would have messed up multi branch histories if I'd been doing any more complex cases