Gravar-mail: Engineering integrated photonics for heralded quantum gates