Refactor: Replace malloc ditherbuf with std::vector
Refactor: Replace malloc buffer/link_table/page_table with std::vector