Add "toArray" function

Designed to work seamlessly with the nested set model
Merge branch 'master' of github.com:Goktug/Nestable into develop