Factor the ovsdb-server main loop into a new function

This refactors the ovsdb-server main loop into a new function, which allows
to call it from multiple places.

Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
Signed-off-by: Ben Pfaff <blp@nicira.com>