Use direct pointers for surface and surface dependencies from Drawable
As we use reference counting is more direct to use direct pointers. Also this will allow to have a surface in a "released state" reducing the complexity of code destroying a surface.
Store pointers to surface object in "surfaces" and allows to have different surfaces with same ID in memory. The surface was keep "busy" if there was pending drawing around.
Consider the following case:
- receive drawing command
- queue command on DCCs
- destroy surface
- send draw
Previously at point 4) you would have to use a surface from "surfaces" which was destroyed, that is we would have to maintain the pointer (and canvas) to the surface until reference counter was 0.
However consider this case:
- receive drawing command
- queue command on DCCs
- destroy surface
- create surface
- send draw
What would happen in point 4) ? We could not change the surface as it will be used by point 5). To avoid this the code attempts to wait the commands to be release the surface. However this can be an issue, you can't force the clients to receive pending data if network is slow.
So this patch change this allowing to create surfaces while the old version will still be used.
This is also more clean from the reference pointer prospective, as the reference is increased for a specific surface.
Note that now instead of checking for canvas to not be NULL a simple check for surface pointer is enough.