whitespace
Enhanced tests for new plain text reST parser

Update issue 1495
Enhanced tests a little. Most importantly ignoring non-robot code blocks is now tested.
Test non-ASCII data with all supported data formats.

Non-ASCII data is tested more thoroughly elsewhere, but now it is tested with different parsers explicitly.

Also some trailing whitespace was removed automatically.

Update issue 1495
Added a test for non-ASCII data. Needed to add it to all other formats too.
RestReader: rafactored the code and fixed handlig relative imports.

Update issue 1495
I started a quite big refactoring to make the code more compatible with
PEP-8 and other code in Robot Framework code base. Also wanted to
separate registering directives from parsing etc. The refactoring is not
yet ready, but because I don't have time to finish it this weekend I
wanted to commit and push what I have done.

The most important reason because I wanted to get the code pushed was
that it contains a temporary fix for handling relative imports in reST
files. This wasn't tested by any parsing related acceptance tests, but a
test for running the Quick Start Guide in reST format fails. The commit
contains also relative imports of empty files in the parsing tests.
RestReader: Cleaner implementation to support includes.

Also renamed document -> doctree and utf-8 -> UTF -> 8.

Update issue 1495
Use source_path argument instead of os.chdir. Also added includes with actual
test data to tests.
RestReader: NamedTemporaryFile -> StringIO

Update issue 1495
Realized we can simply use StringIO istead of temp files. That is a lot
simpler and ought to be also faster.
RestReader: Simplify handling code dependent on docutils.

Update issue 1495
It's easier to have docutils dependent code in a separate module. No ifs
needed there anymore. Also directives are registered only once, because
this module is never imported more than once (and would be cached if it was).
Added Remove From String and Remove From String Using Regexp keywords

update issue 1491
Renamed Remove From String. Modified it for multiple remove arguments.

update issue 1491

Renamed to Remove String and Remove String Using Regexp and removed
count argument. Remove String can now be used to remove several substrings
given in arguments. We found this to be more valuable as Replace String can
still be used for more rare use cases like using count parameter to remove
only certain number of matches.
Parsing: Added atests for handling escaping using `\` with different formats.

Update issue 1495
Noticed that escaping is done differently with different reST parsers and
added tests to verify it.

The old parser requires double escaping because `\` is an escape character
both in Robot and in reST. For example, Windows paths need to be given like
`C:\\\\temp` and newline is `\\n`.

With the new parser normal escaping is enough. Windows paths look like
`C:\\Temp` and newline is `\n`.

These differences need to be documented in the User Guide. I'm currently
enhancing the docs related to reST parsing in general and I'll take care of
that too.
New reST parser: Support `code-block` and `sourcecode` as aliases for `code` directive.

Update issue 1495
I decided to add support for `code-block` and `sourcecode`. Trivial to
implement, may be useful in some cases, and as a bonus we got rid of the
old custom directive for `sourcecode`.
Implemented multiple patterns for Remove String Using Regexp. Modified docs.

update issue 1491

It's useful to remove also multiple regexp matches at once. Modified the docs
for Remove String (Using Regexp) and Replace String (Using Regexp) to runnable
format. In original examples the variable to be modified was not set which
made it hard to figure out how the keywords actually modify the input string.
UG: Small corrections to section about ignored data
Automated merge with https://robotframework.googlecode.com/hg/
String: move new Remove String keywords next to Replace String keywords they use internally
String: Enhance docs of Replace/Remove String (Using Regexp).

Update issue 1491
Cc: pekka.klarck
Status: Done
Enhanced docs. Consider done.