CMake: Misc. Fixes

- Generate VERSION if it does not exist
- Add MANIFEST and VERSION files to dist tarball
- Remove some warnings under 3.1.0-rc1

Change-Id: Ib7a45235b527b513d20eb3443fac70428b722f93
Reviewed-on: http://review.couchbase.org/43197
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>