Modernize autotools usage and split unittests into separate TESTS target
and use absolute path in build directory for zscanner tests.

Change-Id: I75b6d02b93d28cc9ff1354d5432d10b20cf734b5