Updated Schema Flattening and Duplicate Removal with correct caching.

Updated Schema Flattening step with correct instance caching. for
instance, if schema A's child schema B is flattened, all schema B's
children will have schema A's instances as their parent schema
instances. The same is done for Duplicate Removal as well.

Changes related to Parameter Tuning GUI are also added in Key
Identification and Duplicate Removal.
Addressed comments removed.
Merge pull request #14 from yaoeric/devel/refactor

Updated Schema Flattening and Duplicate Removal with correct caching.