title: Adding pagination cursor and additional features to endpoint result
body: <p>Strongloop api has been great to work with right out of the box. However I am currently trying to make some customizations. I am trying to add to the <code>category</code> model a remote method that returns along with the endpoint data the following: <code>perPage</code>, <code>total</code>, <code>paging</code>(shown below in more details). For <code>paging</code> the <code>before</code> and <code>after</code> are parameters based on <code>gameId</code>. <code>limit</code> will default to <code>5</code> if value is <code>null</code> or greater than <code>5</code>. What would be the best way to append to result the previously mentioned? </p>
  
  <p>For example, <code>http://localhost:3000/api/Categories/1004/games/mature?before=1000053</code> will return all <code>gameId</code> less than <code>1000053</code> and <code>before</code> all <code>gameIds</code> greater than <code>1000053</code>. </p>
  
  <blockquote>
    <p>common/models/category.js</p>
  </blockquote>
  
  <pre><code>  Category.findById(id, {}, function(err, category){
          if (err) return callback(err);
          //set limit
          if (limit &amp;&amp; limit &gt; 5){
            limit = 5;
          }else if(limit === undefined){
            limit = 5;
          }
          //set after cursor
          Games.find({
              "where": {
                  categoryId: id,
                  mature: true,
                  gameId: {gt: after}
              },
              "limit": limit
          }, function(err, gameArr) {
              if (err) return callback(err);
              callback(null, gameArr);
          });
      });
  </code></pre>
  
  <p>Endpoint results for <code>/Categories/1004/games/mature</code></p>
  
  <pre><code>{
        “perPage”: 5, //value from limit
        “total”: 5, //total of return items from array
        "data": [
           ... Endpoint data is here
        ],
        "paging": {
          "cursors": {
            "after": 1000057, //last item in array
            "before": 1000053 //first item in array
          },
          "previous": "http://localhost:3000/api/Categories/1004/games/mature?before=1000053" //url for previous
          "next": "http://localhost:3000/api/Categories/1004/games/mature?after=1000057" //url for after
        }
    }
  </code></pre>