New method to remove header/footer of armored text

This should fix segler-alex/Pidgin-GPG#15.