Switching to Agda 2.4.2.2 and stdlib 0.9.

In Agda 2.4.2.2 there are some additional restrictions on the use of
`rewrite`. So, `subst` has to be used instead.