addressed issue https://github.com/globaleaks/GlobaLeaks/issues/564

implemented and ready to be merged.

on my platform this allows ready queries to be faster of the 100%;

for example on /contexts, /node, /receivers we pass from ~260ms to ~6ms.

and for example also the tests with trial (that involve quite only writing actions) takes from 165s to 150s.

@vecna / @hellais can you take care of reviewing this?