Modified consume_optional_lws.

It handles arbitrary lenth LWS now.