fix various bugs with level_map iterator and find
adding tests and bug fixes for bitname_db