[46594597] replace mongodb with postgresql

Function test and UI manual test on local box pass.

And the code relative to PostgreSQL is pretty isolated so we can switch to other persistent database very easily.

Still need effort to push to cf.com for testing.

Signed-off-by: Henry Chen <hchen@vmware.com>