added the channel cache ad make it first implementation with the DatasetCache class

Change-Id: I69547168b045ea4df8db04084536253ff24ea4ac
resolved the but that prevent the wPtr and rPtr to switch. Correct laso the
modu operation to compute the writeIndex.

Change-Id: Ida163a90d4ec57a72366662aa5459ac104ee0360