Move everything specific to NSError to "Result+Foundation.swift".

Likewise with unit tests.
This way those who make their own error types in e.g. frameworks can use just Result.swift.
Make unit tests use custom error type.
Cleanup comments and add structural newlines.