Moved pact writing into mock server, so the mock server can be reused by consumer libraries in other languages.