Added setter and getter functions to classes.

In addition, some more functions are added to be used by mapping
steps to keep the instance caching accurate during duplicate removal or
schema flattening.
Updated "equals" function for Relation class.
Merge pull request #13 from yaoeric/devel/refactor

Added setter and getter functions to classes.