Quenched invariance principles for the maximal particle in branching random walk in random environment and the parabolic Anderson model