Added an "invert" selection function

Two new functions were created: "clearranges" and "invert". "clearranges" clears all of the (multi)selected text in a document and "invert" clears all the current (multi)selected text and selects all the text that wasn't previously selected.