added support for sorting array

We need a mechanism for sorting the array. This enhancement allows us to define a sortBy function for this purpose. Here is an example (after creating items, they can be dragged by clicking the "||||"):

```html
<!DOCTYPE html>
<html ng-app="todos">
  <head>
    <meta charset="utf-8">
    <title>Todos</title>
  </head>
  <body>

    <h2>Todos</h2>
    <div ng-controller="TodoCtrl">
      <ul ng-model="todos" ui-sortable="sortableOptions">
        <li ng-repeat="todo in todos track by $index">
          <span style="cursor:move;">||||</span>
          <input type="text" ng-model="todo.txt" />
          <span style="cursor:pointer;" ng-click="delete($index)">X</span>
        </li>
      </ul>
      <form ng-submit="add()">
        <input type="text" ng-model="newTodo" placeholder="do?" />
      </form>
    </div>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.4/angular.min.js"></script>
    <script src="https://rawgithub.com/angular-ui/ui-sortable/master/src/sortable.js"></script>
    <script src="/_api/_files/hoodie.js"></script>
    <script>

      var hoodie  = new Hoodie();

      angular.module('todos', ['hoodie', 'ui.sortable'])

      .config(function(hoodieProvider) {
        hoodieProvider.url('/');
      })

      .controller('TodoCtrl', function($scope, hoodieArray, hoodieAccount) {

        $scope.add = function() {
          $scope.todos.push({
            txt: $scope.newTodo
          });
          $scope.newTodo = '';
        };

        $scope.delete = function(index) {
          $scope.todos.splice(index, 1)
        };

        function updateIndices() {
          $scope.todos.forEach(function (item, index) {  
            item.i = index;
          });
        }

        $scope.sortableOptions = {
          stop: function(e, ui) {
            updateIndices();
          },
          axis: 'y'
        };

        hoodieArray.bind($scope, 'todos', 'todo', function(a, b) {
          return a.i > b.i;
        });

        function afterSignUp() {
          hoodieAccount.signIn('joe2@example.com', 'secret');
        }
        hoodieAccount.signUp('joe2@example.com', 'secret').then(afterSignUp, afterSignUp);

      });

    </script>
  </body>
</html>
````