EZC: Fix count() and conversion to boolean of ProxyArray

Summary: Fix JIT versions of count() and conversion of array to boolean, so that they work with ProxyArray. In both cases, duplicate the logic in ArrayData::size() -- if the sign bit of the size field is unset, use that field, otherwise call vsize().

The resulting generated machine code for conversion to boolean is along the lines of:

  mov    0x4(%rdi),%eax
  test   %eax,%eax
  js     0xf80049b
  setne  %al

where 0xf80049b is the slow path. This is similar to the machine code I previously reported for ArrayData::size() in code review of 1717e028f18 (see #3065).

Added test case which previously failed.
Closes https://github.com/facebook/hhvm/pull/3811

Reviewed By: @ptarjan

Differential Revision: D1568919
Fix nl2br support for carriage returns.

Summary: nl2br() now matches PHP to support prepending of html new lines on carriage returns in addition to newlines.  We also handle special cases when there is a carriage return beside a newline; each pair only get one html new line instead of two.

Fixes #3815

Closes https://github.com/facebook/hhvm/pull/3821

Reviewed By: @ptarjan

Differential Revision: D1571327