Handle raw data I/O.

Paramiko 1.13.0 checks data in the Channel and fails if
invalid UTF-8 characters are sent.  The teuthology/misc.py
functions that piped cat output (get_file) and piped tar
output (pull_directory and pull_directory_tarball) formerly
did not work for Paramiko 1.13.0.

Code was changed to use SFTPClient to copy raw data.  The
remote_mktemp and function was changed to be a method of the
remote object.  Remote object methods to copy files and write
tar files were also added.

In misc.py, get_file() was changed to be a wrapper around the
remote object call.  Pull_directory() and pull_directory_tarball
were changed to use the remote object methods as well.

The remote methods used to send the data makes use of the
SFTPClient interface in Paramiko.

The remote_mktemp function was also modified slightly to insure
that new-lines do not appear in temp file names.

Fixes: 8116
Signed-off-by: Warren Usui <warren.usui@inktank.com>
Clean up remote.py and misc.py changes.

Fixed method names to be non-redundant (remote_mktemp in remote is
now just mktemp, for example), and made some parameters be more
self descriptive.  Added some docstrings.  Fixed sudo setting in
get_file method.

Made chmod independent of the actual sftp file getting.
Do not do extra file copy if non-sudo read is needed.
Fixed some parameter names. Made sure temp files are removed.
Merge pull request #243 from ceph/wip-8116-wusui

Wip 8116 wusui
Remove unused timeout arg to ResultsReporter init

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add a requests.Session object to ResultsReporter

By default it is set up to retry requests 10 times

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Use the new ResultsReporter.session object

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Drop usage of safe_while

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>