get_file: do not read same url once again

Since for same url, the content is same. We just need to reuse the
content get_file read first time. No need to read it again.

Change-Id: I08bdb3e953e5ed44674d6adb18efb7ac2fbcd18e
get_file: encode non utf-8 encoding files via base64

So get_file can support binary file(zip, tgz), non utf-8 encoding
text(gb18030, utf16) files and utf-8 encoding files.

zip and tgz files may be used in chef cookbooks support.

Closes-Bug: #1284501

Change-Id: I72d9bc366f5a94c3c297cb8915ae7b0aa63a34d7
Merge "get_file: do not read same url once again"
Merge "get_file: encode non utf-8 encoding files via base64"