Blender exporter - apply armature transform to bones

This (hopefully) fixes #3527

The code works for my test cases, but I'm neither an expert in Blender nor Python, so someone more experienced please have a look at the code.