Modify the initializer to report invalid attribute

Now the initializer has been changed so that when the initializer
assigns to wrong attributes that does not correspond to any fields,
ValueError will be raised. In this way, typos in the initializer can be
spotted more easily.

Also a all test is added to test the value-based equality testing.