Support for programmatically-added links; Assorted fixes

This adds the ability to add links to text programmatically. For example:

```objc
NSMutableAttributedString *string = @"Just google it";
NSRange theLinkRange = NSMakeRange(5, [string length]-5);
[string setAttributes:[NSDictionary dictionaryWithObject:[NSURL URLWithString:@"http://google.com"] forKey:JTextViewLinkAttributeName]
                            range:theLinkRange];
textView.attributedString = string;
```

Also a few bug and warning fixes.