Add test helpers for using FsCheck

These functions are copied from ExtCore project
Write most of test cases for lib module in FsCheck

If functions have equivalences in FSharp.Core, using those for
model-based testing.

Otherwise, they are tested using specific properties.
Redefine Failure pattern to accommodate more exceptions

Resolve wrong references in NHol.Tests project