Fix #1328271 dropping constraint that is not supposed to be dropped

The title of the bug is little misleading the core does not happen when
allowing the the constaint as a reference object to e dropped.  The core
happens later when dropping the table itsef since the foreign is
referencing to a constraint that was already dropped, which should not
have been dropped in the first place.  So the actual problem is we
should not be dropping the unique constraint when there is a foreign key
constraint referencing it.

The fix is to not drop the unique constriant and raise an error when
there are ref constraints referencing this unique constraint.

Change-Id: I7a3b1d261b968edc094e996d9e165445a72f6eeb
Merge "Fix #1328271 dropping constraint that is not supposed to be dropped"