Fix for Bug 3955.

Problem:
Without upgrading metastore first when the customer upgrades the packages (code) from 0.7 to to a newer version and accesses metastore from Hive, Hive makes silent changes in metastore. Later when the customer runs upgrade script to upgrade the metastore from 0.7 to 0.8, it fails and HiveQL commands from Hive prompt cause NullPointerException.

Defect:
Silent changes made by the Hive causes the metastore upgrade script to fails. For example one of the silent changes made are adding a new column CD_ID to SDS table without initialization. This column should be added as part of the metastore upgrade script and initialized with proper values. So when the script tries to add the same column it fails as the column already exists. The script doesn't proceed further and CD_ID is left with NULL values which is causing NPE.

Fix:
Upgrade script (upgrade-0.7.0-to-0.8.0.mysql.sql) has two scripts. 008-HIVE-2246.mysql.sql and 009-HIVE-2215.mysql.sql. Fix involves following changes:
1. Add exception handlers to top methods in 008-HIVE-2246.mysql.sql and 009-HIVE-2215.mysql.sql. Exception handlers set error message in session variable created in upgrade-0.7.0-to-0.8.0.mysql.sql script. So that when either scripts fails, we get a valid message at the end.
2. Add conditionals when creating columns/tables/indexes. This way the script can ignore the silent changes made by Hive before upgrading the metastore.

Testing done:
1. Created several tables using Hive 0.7
2. Upgraded the hive packages to 0.9 with the same metastore used in step 1
3. Ran hive and tried 'show tables'. This created the new column CD_ID in SDS
4. Upgraded the metastore using script upgrade-0.7.0-to-0.8.0.mysql.sql
4. Now tried commands from Hive prompt which are working as expected without any exception
build: fix repo definition in build.xml and ivy/ivysettings.xml
Ported hiveserver2 patch
Revert "Ported hiveserver2 patch". Checked into the wrong branch

This reverts commit 2301d5ebfe5bd6b190bd1e6884bb4e1f0e8ca9cd.
MapR 9663 - Hive TIMESTAMP column type does not support required timestamp formats (HIVE-3844)
BUILD: update build.properties
BUILD - preparing for release.
HIVE-3709 Stop storing default ConfVars in temp file