att: Add encode execute write support

Add function for encoding Execute Write Response PDUs.
unit: Add test for long write using gatt_write_char()
unit: Add test for gatt_discover_char()
attrib: Run callback with the partial result of characteristic discovery

Callbacks should check for status equal to ATT_ECODE_ATTR_NOT_FOUND to
ensure that the characteristic discovery has finished.
unit: Add test for gatt_discover_char() (by UUID)
attrib: Reduce scope of variable declarations in char_discovered_cb()

This makes it easy to identify where variables are being used.