Mark low-level-api tests as requiring extensions

Previously, only the high-level API tests were marked as requiring
certain extensions.  This meant that otherwise good runs of low-level
tests would fail on systems that lacked one or more of the supported
extensions.

This commit moves the `_extension_test` decorator into a shared
test module so that it may be used by both the high-level and
low-level tests to indicate that a particular test should only
be run if an extension is present.