Only inline indexes when we are certain they are cheap.
Add newIdent' convenience function.
Move enabling optimisation stuff around a bit.

Most significantly, run the index-inliner when optimising lambdas
for fusion.