Added more general equality comparison logic in std.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>