Add custom menu item attributes in Drupal 8

We're currently working on a Drupal 8 project, where we need the possibility of adding class attributes to menu items. In D7, one would probably choose the menu attributes module to accomplish this. But unfortunately, there is currently no D8 port available. In this quick tutorial I'll show you, how to create your own tiny module to solve this problem.