[R] refactor the client and downloader, add docopt for cli

download torrent from file seem to be broken since this build