Rewritten rotate() using middle point and arctan

This resolves Issue #165 

https://jenkins.catrob.at/view/All-Categories/view/Paintroid/job/Paintroid-custom-branch-test/887/