added op for pooling

Basically adds pooling to the supported ops.
Instead of copying this method, you move it to dnnbase class. This remove duplicate code.