Fast algorithms for compressing electrically large volume integral equations and applications to thermal and quantum science and engineering