getlantern/lantern#1766 Manually merging yaml
#1766 Simplified
Fixed compile and test failures
getlantern/lantern#1766 Made config non-global
getlantern/lantern#1766 Added default weight
getlantern/lantern#1766 Fixed application of flags
Merge branch 'master' into 1766
Merge branch '1766'