Make lessc::addParsedFile public

We extend lessc with a custom function that embeds small images in the
generated CSS as base64-encoded data URIs. It'd therefore be useful for us to
tie cache invalidation to the mtimes of these image files by invoking
addParsedFile from the custom function. This patch makes that possible by
changing the visibility of lessc::addParsedFile from protected to public.
On invalid LESS, throw exception rather than emit blanks

This patch makes lessphp throw errors when it is called to compile LESS code
that references undefined variables or mixins. A mixin invocation will cause an
exception to be thrown if it fails to match, whether it is because no mixin of
that name exists, or because the invocation fails to match against the
signatures or guards of defined mixins. This is consistent with the behavior of
the reference LESS implementation.

The patch removes cases from tests/inputs/* that fail to compile. A new test
suite, ErrorHandlingTest.php, verifies the new error-throwing behavior.
Merge pull request #478 from atdt/master

On invalid LESS, throw exception rather than emit blanks
Merge pull request #472 from atdt/master

Make lessc::addParsedFile public
Make function helpers public

The set of helper functions that the built-in lib_* functions use to validate
their arguments and generate output should be part of lessphp's public API,
because they are very useful to anyone implementing custom functions.
Accordingly, this patch makes the following protected functions public:

 * assertArgs
 * assertColor
 * assertNumber
 * colorArgs
 * throwError
 * toBool

The patch also makes public the properties $TRUE and $FALSE, since they are
useful for writing custom predicate functions.
Improve handling of /* comments */ when 'preserveComments' is set

When preserveComments is set,
- The top comment in a block should not "jump" outside the block.
- Comments should retain their position relative to the rules that follow them.
- Comments should not be deduplicated.
- When a repeated rule is deduplicated, the comments that precede each
  occurrence should be consolidated above the deduplicated rule.

Because comments and whitespace are handled in tandem, the change impacts
slightly the handling of whitespace. Specifically, 'e(this is simple);' was
previously interpreted as though it were written 'e("this");'. It now causes an
error instead, which is the appropriate behavior (it's how less.js handles it).
Miscellaneous small touch-ups

- Remove a couple of unnecessary seek() checks.
- Fix typo in variable name (initialized as 'seenComments', but used as
  'commentsSeen')
- Remove redundant array_values() call
- Remove unused 'lastCount' variable
- Consistently capitalize 'LESS' and 'CSS'.
- Remove trailing whitespace from several files.
Merge pull request #480 from atdt/master

Improve handling of preserved comments; make custom function helpers public
Update lessc.inc.php

use property_exist to avoid the inconsistent error message:
"Undefined property: stdClass::$parent"
when error reporting is set to ALL
Merge pull request #485 from mkdgs/patch-1

Update lessc.inc.php
Update lessc.inc.php

Fix: color: contrast(#000); generate error because light and dark was not optional, the contrast function not act like lesscss.org documentation.
also the thresold is fixed and not implemented like less.js

this change:
- make optional light color, dark color and threshold
- threshold act like less.js implementation
- add lib_luma (for threshold calculation)
Update lessc.inc.php
rebuild tests
implement data-uri([mimetype,] url) from less.js 1.4.0
data-uri: add tests and use lessc::findImport to locate the file
use the built-in php magic database instead of the system one
Merge pull request #500 from nyordanov/master

Implement data-uri([mimetype,] url) from less.js 1.4.0
docs typo
CS fixes
Travis improvements