add #buildLookup method to turn collection in to a fast lookup hash

implement #without in terms of it
add tests and internal docs
(cherry picked from commit 263b1ee92d49147e6a507e3316141d66a912c760)