Fix middle test to find the right postgis extension files.
Remove statics from `middle_pgsql_t`.
Removed statics from `middle_ram_t`.
Removed statics from node cache objects.

Updated middle layers and node cache reader to allocate and use
the new node cache objects.