Added condition to check if HEX code contain only valid characters (issue #1015)

Hello, 

I have fixed issue #1015. Less was recognizing HEX code of length 3 inside intended longer HEX code, where were invalid hexadecimal characters.

This is my first contribution to less.js, so if there is something I missed - please tell me, I will gladly improve it. Have a nice day,

Ondra