Add SearchForm::count method
Turn newline characters into br tags in HTML, except in pre
Use multibyte substr and strlen functions

Fixes spans being positioned incorrectly after multibyte characters
Rewrite StructuredText::asHtmlText

This rewrite uses DOMDocument rather than manually editing the HTML
string.

We drill down to the right text node based on the required offset of
the span, split it in the necessary places and wrap it in the new
node. We then don't need to worry about the new tags causing offset
changes, since the DOM model doesn't count the tags as text.

It should be much more reliable; it's certainly much easier to read
and understand, in my opinion.

This patch also closes a couple of potential issues and one definite
issue: we skip over spans which are invalid (either improperly nested
or which end before they start).

There are commented out `throw new \Exception` lines where warnings
could be emitted. I don't want to throw exceptions because I still
want some rendered HTML.
Merge pull request #29 from tremby/feature/nl2br

Turn newline characters into br tags in HTML, except in pre
Merge pull request #36 from tremby/bugfix/handle-multibyte-characters

Use multibyte substr and strlen functions
Fix last commit

- remove trailing spaces
- use `array()` instead of `[]`
Merge pull request #37 from tremby/bugfix/handle-invalid-span-positions

Rewrite StructuredText::asHtmlText
Update README.md

Add proper link on the travis-ci badge
Add private SearchForm#submit_raw method

This add allow to remove the $raw parameter from
SearchForm#submit
Merge pull request #26 from tremby/feature/count-query

Add SearchForm::count method
Added methods for retrieving all blocks of a certain type.
Merge pull request #38 from RobinvdVleuten/master

Added methods for retrieving all blocks of a certain type.
Fix a test about ImageView
Merge pull request #39 from srenault/master

Fix a test about ImageView
Fix groupBy ref by label
typo fix
Merge branch 'master' of https://github.com/srenault/php-kit into srenault
Merge branch 'typo-fix' of https://github.com/lsmith77/php-kit into typo_fix
added __toString() to Prismic\Ref