Build Codex from source if repo is included
Created by: catrope
Similar to OOUI, except it's JS only, no PHP.
Also add support for 'main' as an alias for the 'master' branch. Without this, installing Codex fails, because it doesn't have a branch named 'master'.