[client] refactor: extract common from seaf_download and seaf_sync
[client] allow user to specify not only library id, but library url