Ship m4/ in version control to prevent aclocal errors.
Check for Control.Monad.State as well as base GHC.
Select the SSSE3 flavor of chacha_krovetz.c correctly.

The additional CPU feature required by the fastest x86 version of
chacha_krovetz is SSSE3, not SSE3 (note the third S!) (specifically,
it wants _mm_shuffle_epi8, which is part of SSSE3 but not SSE3). The
build-time detection was wrong, causing both versions of the compiled
code to be identical, and the runtime detection was wrong, causing the
allegedly-SSSE3 code to be used on CPUs that didn't have that feature.
The build-time bug masked the runtime bug.

Many of the changes here are just s/\<sse3/ssse3/i.
Reorganize and modernize configure.ac.
Reorganize and streamline Makefile.am
Reduce code duplication in configure.ac. Don't build chacha_krovetz.c at all if --disable-simd.
Revamp the SIMD detection.

The convenience libraries containing specially-built variants of
chacha_krovetz.c now have generic names, as do all the macros and Makefile
conditionals.  The configure script knows how to detect the necessary
intrinsics for ARM and PPC as well as x86, and will arrange not to build
chacha_krovetz.c at all if the appropriate intrinsics are not available.
Use autoconf to probe for arc4random and arc4random_buf.

This fixes the build on OSX 10.6, which has the former but not the latter.
Merge remote-tracking branch 'zackw/topic/autotools'

Conflicts:
	Makefile.am
	configure.ac