[btree] visitor now passed as a reference rather than shared_ptr