Stub out an API for determining the length, in bytes, of the valid UTF-8 sequences in a string.

Issue: PLCR-532
Implement API for trimming incomplete UTF-8 multibyte sequences from a truncated UTF-8 string.

Issue: PLCR-532
Use the new UTF-8 multibyte truncation handling to clean up p_comm values.

Issue: PLCR-532
Log the target pid when fetching the process name fails.

Issue: PLCR-532
Document that the process name values may be nil.

Issue: PLCR-532
Add missing nil checks for process name values.

This ensures that the inability to fetch or decode the process name (eg,
due to use of invalid UTF-8) won't trigger a crash at crash reporter
initialization time.

Ideally, this code would be unit tested, but that will require
significant changes to the PLCrashLogWriter; in the interests of
regression avoidance, we'll revisit larger-scale API changes as part of
the general refactoring of this code scheduled for the next major
update.

Issue: PLCR-532
Remove unnecessary macro argument in LEN_UTF8() macro.

This is a non-functional change.

Issue: PLCR-532
Additional tests and and memory over-read validation.

This adds a few improvements recommended by Mike Ash:

- Tests for 0-length strings, as well as strings that start with
  invalid byte sequences.
- A minor rework of the tests to lay out the test string bytes at the
  end of a page, directly before a PROT_NONE page. This allows us to use
  page protections to assert that over-read does not occur.

Issue: PLCR-532
Use strlen() directly.

Since this code path is not declared async-safe, there's no need to implement
our own inline strlen.

Issue: PLCR-532
Clarify the comment describing termination within an invalid sequence.

Issue: PLCR-532
Merge pull request #3 in PLCR/plcrashreporter from bugfix/PLCR-532-utf-8-process-names-truncated to release/plcrashreporter-1.2

* commit 'ecd405532bd12b814339fc9f76b7116fac50e981':
  Clarify the comment describing termination within an invalid sequence.
  Use strlen() directly.
  Additional tests and and memory over-read validation.
  Remove unnecessary macro argument in LEN_UTF8() macro.
  Add missing nil checks for process name values.
  Document that the process name values may be nil.
  Log the target pid when fetching the process name fails.
  Use the new UTF-8 multibyte truncation handling to clean up p_comm values.
  Implement API for trimming incomplete UTF-8 multibyte sequences from a truncated UTF-8 string.
  Stub out an API for determining the length, in bytes, of the valid UTF-8 sequences in a string.