struct packed: add fallback byte array implementation, use gcc_struct on Windows, unit tests

https://sourceware.org/bugzilla/show_bug.cgi?id=29373

- Windows hosts need attribute gcc_struct.

- attribute gcc_struct seemingly doesn't work with Clang, so add a
  fallback standard-conforming implementation based on arrays.

- add unit tests to make sure both implementations behave the same
  way.

- add more relational operators while at it.

Change-Id: I023315ee03622c59c397bf4affc0b68179c32374
3 files changed