Factor out webmachine startup and shutdown for integration testing