Add a custom cmake test target, make check

Added a target for running `make check` which will run tests
with 4 tests in parallel at a time. Also added dialyzer as
part of test target.

Change-Id: Ib91b759799a5cde8d9274e85e7e345c5c4a58049
Reviewed-on: http://review.couchbase.org/34921
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>