Added sanitise_dim function for Issue #801

As discussed in issue [#801](https://github.com/hadley/ggplot2/issues/801), `facet_wrap` doesn't properly check the `nrow` and `ncol` arguments, particularly negative values.

I've added a `sanitise_dim` function (plus some tests) to deal with this.