Several fixes in StatefulArray

The fixes are:

* Update in-line documentation of StatefulArray to address [#16632](http://trac.dojotoolkit.org/ticket/16632)
* Fixed memory leak with StatefulArray creation
* Make sure statefularray.instanceof(StatefulArray) works