CXX-390 Use mongodb_uri to extract process port

Unfortunately, yes. This got merged into it by mistake, because I slapped it on temporarily to make it build and then moved around a bunch of lines. I should probably merge this commit in first as a result.