Fix bugs relating to wells versus perforations.

Two kinds of bugs: correct usage of wops_.w2p vs. wops_.p2w, and
correct sizes for some variables (nw vs. nperf).