improved mongodb authentication

Signed-off-by: Wouter Vroege <wouter@woutervroege.nl>
Adding postgre support for jsDAV (CardDAV only)

includes:
- mocha unit tests
Merging changes back in
fixing incorrect merge
adding newlines
adding create script for database
Merge branch 'refs/heads/mongo'
Merge remote-tracking branch 'upstream/master'

Signed-off-by: Wouter Vroege <wouter@woutervroege.nl>

Conflicts:
	lib/shared/backends/mongo.js
first steps toward caldav support
fix mimetype
allow empty .htdigest files. Fixes #78. Thanks @mcooley
fix lock timeout handling. Fixes #82. Thanks so much, @honx
beautifying...

Signed-off-by: Wouter Vroege <wouter@woutervroege.nl>
added a newline

Signed-off-by: Wouter Vroege <wouter@woutervroege.nl>
make uploading files from browsers work properly. Fixes #79
fix error found by @bancek. Thanks\!
Fixing formatting issues
remove CardDAV refs from comments
iOS compatibility
bugfix iOS