On the Canonical Bundle Formula and the Quasi-log Canonical Theory