Refactored the utf8 decoding and verifying code. Also added tests for boundary utf8 byte stream cases