Fixed: empty strings and indexes out of range were not handled
Fixed: empty strings and indexes out of range were not handled

Previously CPAttributedString did not provide an -init method,
with the result that an attributed string created with [[CPAttributedString alloc] init]
would not be correctly initialized.

Also, some methods that took indexes into the string were not checking for an invalid index and were not raising exceptions when the documentation said they should.

Finally, some methods that were supposed to return empty dictionaries were returning nil.

This commit fixes all of these problems. Empty strings should no longer cause errors.

Closes #533

zittix/cappuccino,wangshijin/cappuccino,krodelin/cappuccino,Dogild/cappuccino,zittix/cappuccino,primalmotion/cappuccino,Dogild/cappuccino,enquora/cappuccino,cacaodev/cappuccino,Dogild/cappuccino,krodelin/cappuccino,FrankReh/cappuccino,krodelin/cappuccino,mrcarlberg/cappuccino,AlexanderMazaletskiy/cappuccino,primalmotion/cappuccino,tancred/cappuccino,wangshijin/cappuccino,tancred/cappuccino,AlexanderMazaletskiy/cappuccino,tancred/cappuccino,FrankReh/cappuccino,wangshijin/cappuccino,cappuccino/cappuccino,kidaa/cappuccino,tancred/cappuccino,krodelin/cappuccino,mrcarlberg/cappuccino,zittix/cappuccino,koamac/Cappuccino,cacaodev/cappuccino,zittix/cappuccino,Dogild/cappuccino,mrcarlberg/cappuccino,AlexanderMazaletskiy/cappuccino,enquora/cappuccino,rgv151/cappuccino,enquora/cappuccino,Rosch/cappuccino,deltaprojects/cappuccino,cappuccino/cappuccino,koamac/Cappuccino,daboe01/cappuccino,rgv151/cappuccino,zittix/cappuccino,wangshijin/cappuccino,Rosch/cappuccino,rgv151/cappuccino,primalmotion/cappuccino,krodelin/cappuccino,deltaprojects/cappuccino,FrankReh/cappuccino,mrcarlberg/cappuccino,AlexanderMazaletskiy/cappuccino,koamac/Cappuccino,mrcarlberg/cappuccino,Rosch/cappuccino,cappuccino/cappuccino,Rosch/cappuccino,FrankReh/cappuccino,daboe01/cappuccino,koamac/Cappuccino,wangshijin/cappuccino,krodelin/cappuccino,daboe01/cappuccino,tancred/cappuccino,koamac/Cappuccino,deltaprojects/cappuccino,cappuccino/cappuccino,Rosch/cappuccino,FrankReh/cappuccino,Dogild/cappuccino,wangshijin/cappuccino,primalmotion/cappuccino,deltaprojects/cappuccino,primalmotion/cappuccino,rgv151/cappuccino,cacaodev/cappuccino,mrcarlberg/cappuccino,enquora/cappuccino,daboe01/cappuccino,cacaodev/cappuccino,cappuccino/cappuccino,cacaodev/cappuccino,kidaa/cappuccino,cacaodev/cappuccino,zittix/cappuccino,AlexanderMazaletskiy/cappuccino,tancred/cappuccino,cappuccino/cappuccino,Rosch/cappuccino,FrankReh/cappuccino,enquora/cappuccino,FrankReh/cappuccino,AlexanderMazaletskiy/cappuccino,daboe01/cappuccino,koamac/Cappuccino,Dogild/cappuccino,kidaa/cappuccino,kidaa/cappuccino,kidaa/cappuccino,kidaa/cappuccino,cacaodev/cappuccino,mrcarlberg/cappuccino,Dogild/cappuccino,daboe01/cappuccino,deltaprojects/cappuccino,cappuccino/cappuccino,Rosch/cappuccino,primalmotion/cappuccino,rgv151/cappuccino,mrcarlberg/cappuccino,primalmotion/cappuccino,rgv151/cappuccino,zittix/cappuccino,daboe01/cappuccino,deltaprojects/cappuccino,rgv151/cappuccino,krodelin/cappuccino,enquora/cappuccino,FrankReh/cappuccino,deltaprojects/cappuccino,enquora/cappuccino