bitbucketcloud: add `apiURL` option
Created by: unknwon
This PR adds a apiURL
external config option to support custom API endpoint. Unit tests are also updated to make sure we respect the config option in all places.
Manually tested to prevent regressions.
Fixes #7990.