Implement and use fequal to fix false negatative tests.

Some tests may not pass due to slight differences in floating
point numbers. They seem to pass when compiled with gcc on
some systems, but not all. It may relate to the gcc version.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.1-2ubuntu1~13.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~13.04)

$ ./ftl_tests
Running test set 'prelude'...10/10 passed
Running test set 'either'...20/20 passed
Running test set 'either_trans'...18/18 passed
Running test set 'maybe'...29/29 passed
Running test set 'maybe_trans'...20/20 passed
Running test set 'future'...6/6 passed
Running test set 'lazy'...12/12 passed
Running test set 'lazy_trans'...6/6 passed
Running test set 'ord'...7/7 passed
Running test set 'functional'...
functor<function>::map: fail
functor<std::function>::map: fail
9/11 passed
Running test set 'list'...24/24 passed
Running test set 'vector'...24/24 passed
Running test set 'forward_list'...22/22 passed
Running test set 'tuple'...5/5 passed
Running test set 'memory'...16/16 passed
Running test set 'string'...5/5 passed
Running test set 'set'...
foldable::foldr: fail
9/10 passed
Running test set 'map'...
foldable::foldr: fail
4/5 passed
Running test set 'unordered_map'...3/3 passed
Running test set 'concepts'...18/18 passed

This commit changes only the tests that failed. The other tests
likely succeed because their calculations can be exactly
represented in binary.
Implement std::unique_ptr monoid instance.
Implement unique_ptr instance of monad.
Change default monad::apply() to accept refs and rvalues.

monad<std::unique_ptr<T>> could not inherit from
deriving_apply<in_terms_of_bind> because its member, apply(),
accepted only regular values.
Implement unique_ptr instance of foldable.
Fix minor formatting error.
Simplify monoid instances in memory.

Convert the nested conditionals to simpler logical statements. This may seem
less efficient, but the compiler should be able to optimize them by reordering
the branches and removing duplicate checks.
Replace enable_ifs with static_asserts in memory.

Produces cleaner error messages and makes memory.h easier to read.
Correct test for rvalue bind(unique_ptr, f).

The rvalue overload of monad<std::unique_ptr<T>>::bind(ptr,f) requires that T
has the same type as f(*ptr). In this case, f returns a float, but got supplied
an int.
Add monoidA instances for unique_ and shared_ptr.
Remove duplicate code in memory.
Make monoidA<unique_ptr<T>>::orDo rvalue-aware.
In memory, implement monoid in terms of monoidA.

This may seem out-of-order, but removes the need for duplicate logic.
Merge branch 'memory' of https://github.com/splinterofchaos/ftl into overload
Enable compilation with clang 3.4.

Optimized make_curried_n to instantiate less recursive templates to avoid
hitting clang 3.4's maximum recursion depth. Instantiating a curried function
with curry<N>(f)(args...) and letting curried_fn_n handle the partial
application and recurrying seems simpler, but too difficult for the compiler.
Merge branch 'master' into overload
Enable manual overload of mem functions/functors.

Implement _dtl::Forwarder<Ret (Obj::*)(Args...)> and <Mem Obj::*> to cover
member functions and member function objects. Since member function objects
cannot be deduced from regular members, it may not be possible to write a
version that can return the member if not a function, and the result of calling
if it is.
Mark _dtl::Forwarder const and constexpr.
Document ftl::overload.
Mark ftl::overload constexpr.