Add == operator for lists

Implemented == operator for lists and added a test case, as the ==
operator must be defined for the implementation of the HashMap to work.