Optimizing the hot loop of KETJU, a research-grade N-body code for supermassive black holes, while keeping its physics output bit-for-bit identical