Fix handling of leading whitespace in check_test().

It was not properly calculating the length of failure diagnostics, which
should be ignored, and was failing to remove a single leading space character
before the diagnostic message. So calculate the lenghts of strings to remove
using the same code as is used to create those strings in `ok()`. This finally
fixes a bunch of tests where leading whitespace in expected results was one
character shorter than it should have been -- and fixes the SKIP tests so that
the leading space that appears before the SKIP diagnostic output is removed.