Toward exact predictions of spin-phonon relaxation times: An ab initio implementation of open quantum systems theory