Application::setHelperSet() must be called before addCommands()

Application::add() calls Command::setApplication(), which in turn assigns the Application's current HelperSet to the Command. Therefore, we need to set the HelperSet before registering any Commands.

This fixes a bug that was introduced in a49d20d1906523bc4845c89666bef9f41794f1b1.
Construct query builder in QueryCommand (fixes #801)

Since #752, the repository find methods return arrays instead of cursors in order to be consistent with the common repository interface. With this change, a query builder is used, and the skip/limit/hydrate options can be applied to the builder directly.
Dump QueryCommand result documents individually, using correct depth

Previously, the array of results was dumped, so the effective depth was reduced by one. Dumping the result documents themselves with the specified depth seems more intuitive.
Merge pull request #808 from doctrine/fix-queryCommand

Fix CLI sandbox command DM helper and QueryCommand