libucl: Fix bugs in C-style comment parser
When an asterisk is encountered inside a C-style comment, we first check
if there is at least one more character left in the buffer, and if that
character is a slash, which would terminate the comment. If that is not
the case, the next two characters are consumed without being inspected.
If one of those is a double quote, or the initial asterisk of an
asterisk-slash pair, we end up misparsing the comment.
MFC after: 3 days
Reviewed by: kevans, bofh
Differential Revision: https://reviews.freebsd.org/D52808
(cherry picked from commit b5e2bd5ef38181ce4a445ec19f1fa5cb6c8ea692)