Add DropoutLayerTest, simultaneously fixing two bugs.