Issue 857 sql load balancing

Use custom slave sessions to speed up SQL queries among several PostgreSQL slave nodes.
Actually I need to update that file completely to the new pattern.