Implemented annotation selection (fixing #2964)

This PR fixes issue #2964. Text selection within annotations is now possible. I have also added the possibility to toggle the visibility of annotations by clicking the annotation icon.