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.
Merge remote-tracking branch 'origin/release/plcrashreporter-1.2'
Bump the version to 1.2-rc5 in preparation for the next RC release.

Issue: PLCR-537
Fix test build for iOS / iOS Simulator.

The mmap() header was implicitly available on Mac OS X; it must be
explicit included when building against the iOS SDK.

Issue: PLCR-532
Use the PLCrashProcessInfo API for fetching and validating process data from the crash report.

This allows us to use a common code path for fetching the process info,
rather than having a test-only code path that does not safely handle
UTF-8.

If we change the unit test's product name (as per the PLCR-532
reproduction case) to UTF-8 that triggers the multibyte sequence
truncation bug, this change allows the PLCrashLogWriterTests to complete
successfully.

Issue: PLCR-532
Merge branch 'bugfix/PLCR-532-utf-8-process-names-truncated' into release/plcrashreporter-1.2
Merge branch 'bugfix/PLCR-532-utf-8-process-names-truncated'
Merge branch 'release/plcrashreporter-1.2'
Switch all targets to clang/C++11.

Issue: PLCR-538
C++11 fix: An explicit instantiation must be declared within the template's namespace.

Issue: PLCR-538