replace core/ directory with lib-posts-to-posts depedency

People want to use the low-level connections API from P2P in their own plugins, but they don't need all the UI code.

Until now, this was achieved by having a mirror of the `core/` directory as a separate repository, but it would be better to just have a distinct library package.

Previous discussion: https://github.com/AppThemes/wp-posts-to-posts-core/pull/1/