Separate optimizers for single instructions and pairs

The peephole optimizer single instruction substitutions have been split
out into a separate function, to avoid the problem of the two-instruction
function aborting without checking the last instruction of the fragment
for single instruction substitutions.

Closes #58.