Added support for LOCATE operation

There are not enough test cases for locate. There should be tests for locate_found, locate_not_found, locate_no_attributes, locate_with_multiple_found, locate_no_max_items, etc.