minor doc fixes
use per-document hash tables for XML IDs and allow disabling them completely with collect_ids=False