Pass params necessary to upload key pairs.

The original implementation did not pass the required attributes to upload
an existing key pair up to the API. This commit addresses that problem
while maintaining backwards compatibility. The 2nd argument was changed
from a string to a hash, a deprecation warning is generated.
Fix logic bug in data structure creation

Don't attempt to merge `attributes` if they aren't a hash.
Merge pull request #2543 from jschairb/fix_rs_upload_key_pairs

Pass params necessary to upload key pairs.