CSSMin: Rewrite encodeImageAsDataURI()
* Make it actually check against the URI length, not file size.
Previous code could produce URIs that edged just over the limit.
* Replace $sizeLimit parameter with $ie8Compat, because that's the
only use case and the file size limit approach was flawed per above,
anyway.
* Remove CSSMin::EMBED_SIZE_LIMIT constant, which is not used anymore.
CSSMin::DATA_URI_SIZE_LIMIT still exists.
* Change code flow to avoid repetition.
* Split off new method, encodeStringAsDataURI(), that does actual
encoding rather than file handling.
Change-Id: I3704404ce831d7e0f6e3a65f23c76f313ad13238