Maximum user limit

This adds a configurable maximum user limit. To enable it, set `maximumUsers` in the default or a provided config file.

This also adds a `GET /accountBuffer` route which, if `maximumUsers` is set, will return the number of accounts left until the limit is hit. It does not divulge the user count.

This still needs tests which I will add tomorrow and manual testing in the example apps.

Closes #286
Good call, I'll add an index on count(id) too

On June 24, 2014 9:31:40 PM CDT, David Dahl <notifications@github.com> wrote:
>> +
>> +/**
>> + * ### getUserCount(callback)
>> + * Get the number of registered users
>> + *
>> + * Calls back with user count and without error if successful
>> + *
>> + * Calls back with error if unsuccessful
>> + *
>> + * @param {Object} options
>> + * @param {Function} callback
>> + */
>> +exports.getUserCount = function (callback) {
>> +  connect(function (client, done) {
>> +    var userCountQuery = {
>> +      text: 'select count(*) from account'
>
>I think count(id) from account might be a more efficient query, no?
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/SpiderOak/crypton/pull/287/files#r14166703

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.