pgserve-master: split master worker into a separate library

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Merge branch 'master' of https://github.com/Udentric/pgserve