2249 - Cleared the message count for ForeverFrame on transport stop.

- This also included adding a check in the receive handler to ensure that the transport is connected before trying to clear any dom elements.

#2249