btrfs: add and use helpers for reading and writing last_log_commit