After reaching an agreement in principle, Bitcoin miner Core Scientific expects to emerge from bankruptcy by the end of this year.