Move functional tests into separate test target.

Also separate out support code from unittests.

Change-Id: I81490950373e170c857b23468da8d97d6aaf50d9
95 files changed