Fix #840: apply boundary rules in CCALF encoder
The CCALF reconstruction function used by the encoder is separate from the one used by the decoder. !1280 (merged) addressed issues in the decoder. This commit addresses a similar issue in the encoder.