Start to reimplement metadata retrieval

Instead of executing tire queries I want to use the tire persistence
layer to retrieve the metadata even though I do not know how this will
work out with the memory as I have to load the whole data into memory.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>