SF: Fix tracing layerhandle to layerid map

Fixes an issue where the layer handle would be
added after it was used in a transaction by adding
the handle before constructing the create layer
transaction in SF.

Fixes an issue where the layer handle pointer
could be reused by a new handle by updating
the map when the handle is destroyed.

Test: presubmit
Bug: 200284593
Change-Id: Ia163e456500fc909bcda6e97dd8c7efa4be50c9e
3 files changed