API: Implement switching of new flags API with NPY_TEST_UNSAFE_STRIDES

This largly reverts the changes to the flags setting api making the
newer preferable unsafe flags setting available through the
NPY_TEST_UNSAFE_STRIDES eviroment variable. This variable is meant for
testing if code will stop working when the flags definition is changed.

The old definition is modified in some details to previously to enforce
safer strides (which was not the case before). This means that ndim==1
size==1 arrays are not necessarily considered contiguous. Also empty
arrays are not considered contiguous in some cases that were contiguous
before, and the rule that an array can only be both C and F-contiguous
if it is one (or zero) dimensional is relaxed, as it is incorrect for
size <= 1 arrays.