Simplify and cleanup mirbuffer to align with upstream mir
After some comments left by upstream mir developers https://github.com/MirServer/mir/pull/2435 and with the new patch up https://github.com/MirServer/mir/pull/2759 this cleans up the code, addresses review from mir developers and removes unused vars.