added op for pooling

Basically adds pooling to the supported ops.
That isn't safe. do something like elif self.mode=='average': ... else: error()