Cypher performance optimizations

Surprisingly these simple micro-optimizations seem to have a measurable impact locally (4 %). I'd like get this in and see it in ronja-benchmarks.