Explaining key properties of lithiation in TiO$_2$-anatase Li-ion battery electrodes using phase-field modelling