[buffer] Fix hb_buffer_append() pre/post-context logic Part of https://github.com/harfbuzz/harfbuzz/pull/3150