HollowNeRF: Pruning Hashgrid-Based NeRFs with Trainable Collision Mitigation