Bitbucket support

Added support for mercurial and git repositories hosted with Bitbucket. Uses a prefix in the data-repo string to indicate Bitbucket. Includes tests for most of the new functionality.