TEIID-2656: The designer based VDBs does not set the reference table name on the ForeignKey, they only set the Primary Key, thus the OData metadata call was failing to resolve the Foreign keys and throwing up an exception. Fixed such that in obsence of Reference table name, if PK is present the value will be derived from it, also pulled Steve's commit to fix NPE
TEIID-2656: adding unit tests
Merge pull request #111 from rareddy/TEIID-2656

Teiid 2656