Add test for html_escape on non-strings

If escape_html is set, the argument passed to html_escape is not
necessarily a string (in the generated code it is passed before being
interpolated).

Add test to check html_escape converts non-strings.

See #673
(cherry picked from commit 4511a75288728577000bec69a667e269faf0c78c)
don't create new regex with fixes encoding each time html_escape is called
(cherry picked from commit 80f70235da6caf7b79bf8644db0c2685c145b4de)

Fixes #673
Fix html_escape failure with frozen strings

Closes #652
(cherry picked from commit 8241fb228bba0412b998e0d3af58634ba12a364e)
Explicitly join ambles in SafeErubisTemplate

Previously Tilt used `join` to combine ambles and template, which
flattened our arrays for us, but this changed in Tilt 1.4.

Return Strings from precompiled_preamble and precompiled_postamble.

Fixes #675
Use custom Erubis handler subclass for Erb filter

The Rails Erubis handler has added code to reduce the number of method
calls when adding newlines (see
https://github.com/rails/rails/commit/bd308a0d02c4a6459c05770a564405986a663f47).

This uses a new instance variable, which is initialised in the
add_preamble method. Tilt explicitly ignores the preamble from Erubis,
using its own, so this variable is never initialised. This causes
failures with the Erb filter when this variable is referenced.

By using our own custom subclass the variable can be initialised in the
classes initialize method, preventing failures.

Fixes #669
Update list of default empty elements
Ensure html_escape docs are picked up by Yard

Move documentation blocks for html_escape and escape_once next to the
respective method definitions for Ruby 1.9+ so that Yard correctly
includes them.
Update links in FAQ.md

Fixes #679
Explicitly join ambles in SafeErubisTemplate

Previously Tilt used `join` to combine ambles and template, which
flattened our arrays for us, but this changed in Tilt 1.4.

Return Strings from precompiled_preamble and precompiled_postamble.

Fixes #675
Use custom Erubis handler subclass for Erb filter

The Rails Erubis handler has added code to reduce the number of method
calls when adding newlines (see
https://github.com/rails/rails/commit/bd308a0d02c4a6459c05770a564405986a663f47).

This uses a new instance variable, which is initialised in the
add_preamble method. Tilt explicitly ignores the preamble from Erubis,
using its own, so this variable is never initialised. This causes
failures with the Erb filter when this variable is referenced.

By using our own custom subclass the variable can be initialised in the
classes initialize method, preventing failures.

Fixes #669
Add reference documentation of useful helper methods
Updated Changelog
Use https://rubygems.org
Don't treat the 'data' attribute specially.

Fixes #678
Prepared 4.0.3 release

[ci skip]
Test against latest Rails 4
Merge branch 'stable'

Conflicts:
	CHANGELOG.md
	Gemfile
	lib/haml/helpers.rb
	lib/haml/version.rb
Remove extraneous space from test name

[ci skip]
Merge branch 'stable'