Rebase from mikedeboer/jsDav, and fix prefer header.

Fast forward rebase from https://github.com/mikedeboer/jsDAV/ .
Change prefer header parser to comply with rfc 7240 (https://tools.ietf.org/html/rfc7240) instead of draft 14 ( http://tools.ietf.org/html/draft-snell-http-prefer-14 ) .