Modified MemorizedResult signature

MemorizedResult does not take the full path toward cached value, but
its components: cachedir, function name, arguments hash.

Some refactoring was performed.
Small fixes on code and tests