Add more storage tests and use the same tests for memory and postgresql

Pickle storage is currently broken so leaving it for now.