binMean2D() now agrees with old boxcarAverage2D()

   library(oce)
   system("R CMD SHLIB bin.cpp") # must be in oce/src
   dyn.load("bin.so")
   set.seed(123)
   x <- rnorm(100, sd=1)
   y <- rnorm(100, sd=1)
   f <- x + y
   source('../R/misc.R')
   m <- binMean2D(x, y, f)
   a <- boxcarAverage2D(x, y, f, m$xmids, m$ymids)
   cat("mismatch to old code:", sum((a$average-m$mean)^2, na.rm=TRUE),
"\n")
   str(m)
   str(a)
   plot(x, y)
   contour(m$xmids, m$ymids, m$mean, add=TRUE, lwd=4, col='pink')
   contour(a$x1out, a$x2out, a$average, add=TRUE, lwd=1)