Move shared library functions to its own file.

They are not tied to the enterprise plugin specifically.
Rename enterprise extension macros to consistent names.

This is to enable reuse of the same files for other extensions in the
Enterprise product.
typedef ServerConnectionState
Rename CFDB_HostsWithClass ->  ListHostsWithClass
Merge branch 'master' of github.com:cfengine/core into general_plugin

Conflicts:
	configure.ac
	libpromises/enterprise_extension.c
	libpromises/enterprise_extension.h
Fix Makefile test after renaming.
Enterprise conversion functions
Make enterprise extension into general extensions.

This way, it can more easily be reused for other extensions.
Export --enable-builtin-extensions to subprojects.
Fix compile error on Windows.
Merge pull request #931 from kacfengine/general_plugin

General extension plugins