AIS-6: Calculate and verify CRC

incl. extended test routine
incl. fixing code to match conventions