Moved get/setCharacter() loop to its own function.

+Added the private function convertLinePosToLocal(std::size_t&) to
    RichText::Line, which gets called from get/setCharacter().

    This function retruns the text that the pos'th character is to be found in
    and modifies the pos value to be the position of the character in the string
    as opposed to in the line as a whole.