utils: new Memoise

* Changes old method of checking 'hashability' into a correct one.

* Removes unnecesary duplicated memoize.

* Adds InstanceMethodMemoise for memoising instance methods.

Signed-off-by: Mateusz Susik <mateuszsusik@gmail.com>