Fetch Bitbucket Server permissions from roaring bitmap endpoint
Created by: kzh
This PR adds in an experimental feature flag that enables fetching bitbucket server user permissions from a faster custom ACL endpoint exposed by the Bitbucket Server Sourcegraph plugin. This is disabled on default.
An observed latency change: 4s
-> 0.7s
for returning 10k repositories.
Testing: WIP. I haven't taken a look into the testing code yet. The immediate test that I can think of is a unit test that mocks the HTTP endpoint that returns the roaring bitmap binary output. I will explore more extensive tests as well.
This is related to sourcegraph/bitbucket-server-plugin#14 and #6091 (closed) .