attrib: Add ending condition checks to iterative procedures in gatttool

These procedures are finished when the returned ATT error code is
"Attribute Not Found".