`transition_memory_released` and `get_nbytes()` optimizations (#4516)
`transition_memory_released` and `get_nbytes()` optimizations (#4516)

* Annotate `nbytes` in `update_data` as a `dict`

The one case where this variable is used it is a `dict`. So go ahead and
annotate it that way. Should speed up usage of this variable when
cythonized.

* Assign `ts.get_nbytes()` to a variable

To avoid calling this method repeatedly in a few cases, assign the
result to a variable and reuse it.

* Create msg once in `transition_memory_released`
dask/distributed,dask/distributed,dask/distributed,dask/distributed