bdr: deparse: Fix CREATE SEQUENCE with no USING
bdr: avoid race conditions when installing bdr extensions

Previously installing the bdr (and prerequisite) extensions was racy
because only the sequencer installed them. Initially that wasn't much
of a problem since only the sequencer and manual queries needed the
schema, but that's not true anymore.

Instead check whether the schema exists in every started worker and
prevent races by acquiring a suitably strong lock on pg_extension
while checking/creating.
code formatting cleanup
check for both extension in two different steps if they exist
use correct lock mode