Refactor code for reuse
Make abc::map::create_empty_buckets() exception-safe