Fixes for 2.1.3 (HAM_ENABLE_EXTENDED_KEYS only allowed in Env::open_db)
refactorings, no functional changes