Fixes issue with missing prev_page link

This addresses #JOINDIN-379

On Pages with only one result the link to a previous page was missing
Adds total count of events

Addresses #JOINDIN-397.

This commit introduces a second SQL-Query that counts all matching
events. That total count is then added to the returned value and also
used to check whether there is a next page to be displayed or not
based on the requested LIMIT-parameters.

This changes the returned value in two ways:

* A new parameter ```meta.total``` is added to the returned values
* On certain occasions the next-link is not present where it was present
  before.
Adds some refactoring

Addresses #JOINDIN-397
Adds more metadata

Addresses #JOINDIN-397

This commit adds more metadata:

- A new field ['meta']['first_result'] contains the count of the first
  result being returned
- A new field ['meta']['last_result'] contains the count of the last
  result being returned

Together with the ['meta']['total'] now any API-call has all
informations needed to display something like 'Events 6-10 out of 325'.
Adds total-count to ALL mappers

Addresses #JOINDIN-397

This Commit adds a total-count to all mappers available
Expire old tokens from trusted clients separately from creating a token
Throw exceptions if token sign-in fails.
Add Frisby tests for token generation.
Note: This requires the dummy data to be added to the database.
Fix "source" column length for comments.
It now matches the length of the data potentially being inserted into it.
Add patch number bump.
#457: Event submit crashes when CFP Start/End is given

In this commit we fix a fatal error that occurs if a CFP start or end
date is given. The start and end date are converted to DateTime objects
but never back into strings before it is inserted in the database.

In addition the the CFP start and end date were not added onto the INSERT
query as prepared statements; causing the actual insert to fail as well.

Both issues are resolved with this commit.
removing the first and last results

Not sure we need these additional fields and they are also at odds with
the counts in the returned pagination links
Merge branch 'heiglandreas-feature/JOINDIN-397'
repairing a readable if statement that got ternaried
Merge branch 'mvriel-457'
altering the check to determine whether we found an item or not - frisby tests picked this up
Merge branch 'fixtests-pr65' fixing failing frisby tests
expireOldTokens is in the oauth model.
Expire old tokens for expirable clients that haven't been used in over a day.
Submitting an event should return 202 if pending

When an event is submitted by a user that does not make the event
automatically be approved then the returned status should be 202
and no location header should be returned.

Included in this commit is that the location header for an approved
event (hence a 201) is the complete URL and not just that of the event.