minigbm: refactor bo refcount and mapping destruction

1. internalize drv specific helpers into drv.c
2. simplify bo ref counting and clean up
3. refactor drv_bo_mapping_destroy

BUG=b:201110412
TEST=CQ

Change-Id: If297ef7007c1d14a69ae467b6d1c67c4edf5b177
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3188470
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
4 files changed