name_db: define separate database for name -> id mapping

Signed-off-by: Alex Dubov <oakad@yahoo.com>