Repository: sunpy/sunpy

Issue:
PrimeKey is not parsed in sunpy.net.jsoc.jsoc.JSOCResponse object when using HARPNUM as PrimeKey
  - SunPy Version: 1.1.1 
  - Astropy Version: 3.2.1
  - Python Version: 3.7.5, GCC 8.3
  - OS information: Ubuntu 18.04 64 bit

### Description
I'm trying to create JSOC query with only HARPNUM as PrimeKey (without Time). My query succeed but when i try to stage data and start downloading it, it return error that there is no prime key. My guess is that PrimeKey is not correctly parsed in  sunpy.net.jsoc.jsoc.JSOCResponse object as shown bellow.


```
MY_MAIL='my@mail.yeah'
HARPNUM=3604
#Lets find primary keys and data sets for our set
import drms
c = drms.Client()
si = c.info('hmi.sharp_cea_720s')
print(si.segments.index.values)
# ['magnetogram' 'bitmap' 'Dopplergram' 'continuum' 'Bp' 'Bt' 'Br' 'Bp_err'
# 'Bt_err' 'Br_err' 'conf_disambig']

print(c.pkeys('hmi.sharp_cea_720s'))
# ['HARPNUM', 'T_REC']

# Lets make jsoc query 
from sunpy.net import jsoc
from sunpy.net import attrs as a
from sunpy.time import parse_time
#initialize client
client = jsoc.JSOCClient()
# Create query
resjsoc = client.search(a.jsoc.PrimeKey('HARPNUM', HARPNUM),
                        a.jsoc.Series('hmi.sharp_cea_720s'),
                        a.jsoc.Segment('Bp') & a.jsoc.Segment('magnetogram'), 
                        a.jsoc.Notify(MY_MAIL))


print(resjsoc)

#         T_REC          TELESCOP  INSTRUME WAVELNTH CAR_ROT
#----------------------- -------- --------- -------- -------
#2014.01.08_03:12:00_TAI  SDO/HMI HMI_SIDE1   6173.0    2145
#2014.01.08_03:24:00_TAI  SDO/HMI HMI_SIDE1   6173.0    2145
#2014.01.08_03:36:00_TAI  SDO/HMI HMI_SIDE1   6173.0    2145
#2014.01.08_03:48:00_TAI  SDO/HMI HMI_SIDE1   6173.0    2145
#2014.01.08_04:00:00_TAI  SDO/HMI HMI_SIDE1   6173.0    2145
#2014.01.08_04:12:00_TAI  SDO/HMI HMI_SIDE1   6173.0    2145
#........

print(type(resjsoc))
#<class 'sunpy.net.jsoc.jsoc.JSOCResponse'>




print(resjsoc.query_args)
#[{'primekey': {}, 'series': 'hmi.sharp_cea_720s', 'segment': ['Bp', 'magnetogram'], 'notify': 'my@mail.yeah'}]

requests = client.request_data(resjsoc)
#ValueError: Atleast one PrimeKey must be passed.
```
I can force my way around it by using time for first and last result of query and creating new one with time as key (which is parsed as expected), but i think there is a bug somewhere.


### Expected behavior
Stage JSOC query with prime key other that time

### Actual behavior
It did not parse HARPNUM as regular primekey

### Steps to Reproduce
Provided code above



Discussion:
After little investigation, primekey is nested key in blocks list here and when i 

>             print(blocks[0]['primekey'])
>             {'HARPNUM': 3604}

print blocks here https://github.com/sunpy/sunpy/blob/master/sunpy/net/jsoc/jsoc.py#L334 i see harpnum, but in scope here https://github.com/sunpy/sunpy/blob/master/sunpy/net/jsoc/jsoc.py#L337 there is no primekey in blocks when appending as query_args.

Primekey is passed and verified trough whole _lookup_records but not returned afterwards, looks like it 'dissapears' here https://github.com/sunpy/sunpy/blob/master/sunpy/net/jsoc/jsoc.py#L746 because of pop. Will look more into this tomorrow.

Resolving patch:
diff --git a/sunpy/net/jsoc/jsoc.py b/sunpy/net/jsoc/jsoc.py
--- a/sunpy/net/jsoc/jsoc.py
+++ b/sunpy/net/jsoc/jsoc.py
@@ -3,6 +3,7 @@
 import time
 import urllib
 import warnings
+import copy
 from collections.abc import Sequence
 
 import drms
@@ -331,7 +332,8 @@ def search(self, *query, **kwargs):
         for block in walker.create(query):
             iargs = kwargs.copy()
             iargs.update(block)
-            blocks.append(iargs)
+            # Update blocks with deep copy of iargs because in _make_recordset we use .pop() on element from iargs
+            blocks.append(copy.deepcopy(iargs))
             return_results.append(self._lookup_records(iargs))
 
         return_results.query_args = blocks


Test patch:
diff --git a/sunpy/net/jsoc/tests/test_jsoc.py b/sunpy/net/jsoc/tests/test_jsoc.py
--- a/sunpy/net/jsoc/tests/test_jsoc.py
+++ b/sunpy/net/jsoc/tests/test_jsoc.py
@@ -40,6 +40,14 @@ def test_empty_jsoc_response():
     assert len(Jresp) == 0
 
 
+@pytest.mark.remote_data
+def test_return_query_args():
+    res = client.search(a.jsoc.PrimeKey('HARPNUM', 3604),
+                        a.jsoc.Series('hmi.sharp_cea_720s'),
+                        a.jsoc.Segment('Bp') & a.jsoc.Segment('magnetogram'))
+    #Because res.query_args is list that contains dict
+    assert 'primekey' in res.query_args[0]
+
 @pytest.mark.remote_data
 def test_query():
     Jresp = client.search(