Issue #25: Changed IState packet count interface to support read and write.
Issue #8: changed c-casts to static_casts.
Issue #8: Added tests for connectionId constructor.
Issue #8: Now calls IStateManager.CanReceive().