Add nd.asarray function to complement nd.array and nd.view

Also add some tests which exercise the various combinations
of view and access flags