utils: new Memoize

* Removes unnecesary duplicated memoize.

* Adds InstanceMethodMemoize for memoizing instance methods.

* Renames Memoise to Memoize.

Signed-off-by: Mateusz Susik <mateuszsusik@gmail.com>
@jirikuncar 

002ca0ee introduces this memoizer although a second one was available in the same file. Can you tell me if there was any specific reason for having direct access to the cache? I had to change a test from test_formatter_engine to pass build due to this.