Embed the code from the negotiate package in the sources
so that we do have to manage yet another dependecy; the code is small and has not been modified for years.
Also move API related code in an swh.core.api package
closes #1499 (closed)
Migrated from D1018 (view on Phabricator)