Added support for closed type families introduced in GHC 7.8
Test case for closed type families

Also found bugs while writing test cases.