gatt: implement server long writes

Buffer writes per-client and per-handle. Cleanup as needed. When asked
to write, perform writes. Return error as soon as it happens, or none if
it all works. As per spec, state of writes in case of error is
undefined. In our case all the ones before the error are done, all the
ones after are not.

Change-Id: I173598e304562a9eaa297a5fd7523e336806f11d
BUG=b:74813838
TEST=test app unbroken
2 files changed