Grainy mousse can be the result of a couple of things. First, you did not sift the powdered sugar and cocoa powder resulting in lumps. Second, you over-mixed the whipped cream. Over-whipped cream becomes butter.