Add hspec and QuickCheck

Reorganise the project to contain a separate test directory.
Fix -Wall -Werror problems.