All Rust commits from Facepunch
Fix upkeep calculations not being correct & persist reference to terminal across restarts