Expose isAlternate as a method of the PTYTextViewDataSource protocol and other improvements as suggested by @gnachman