##### SUMMARY
I have a pam.d file which has no comments and only pam directives in it.  I was attempting to remove the very first one, which is also the first line of the file.  This results in an error.  By adding a dummy comment to the file as the first line, I was able to successfully remove the line I needed.

My guess is that because the [append](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/system/pamd.py#L464) method does not set the `prev` and `next` linked-list properties when the line being append is the first line, the exception occurs.  In the case of `if self._head is None`, `prev` and `next` should be set to `None`.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
pamd

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.8.3
  config file = None
  configured module search path = ['/home/administrator/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/venvs/ansible/lib/python3.5/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
administrator@administrator-PC:~$ ansible-config dump --only-changed
administrator@administrator-PC:~$ 
```

##### OS / ENVIRONMENT
Deepin 15.11, using the `ansible-playbook` command to run a local playbook


##### STEPS TO REPRODUCE
Example pam.d file that does not work (`deepin-auth-keyboard`):
```
auth	[success=2 default=ignore]	pam_lsass.so
auth	[success=1 default=ignore]	pam_unix.so nullok_secure try_first_pass
auth	requisite	pam_deny.so
auth	required	pam_permit.so
```
Playbook task:
```yaml
- name: Remove lsass from Deepin pam.d
  pamd:
    name: deepin-auth-keyboard
    type: auth
    control: "[success=2 default=ignore]"
    module_path: pam_lsass.so
    state: absent
```

##### EXPECTED RESULTS
I expect that the first line of the file is removed

##### ACTUAL RESULTS
```
TASK [kerberos : Remove lsass from Deepin pam.d] ****************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'PamdRule' object has no attribute 'prev'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/home/administrator/.ansible/tmp/ansible-tmp-1565652483.5214953-86228576212948/AnsiballZ_pamd.py\", line 114, in <module>\n    _ansiballz_main()\n  File \"/home/administrator/.ansible/tmp/ansible-tmp-1565652483.5214953-86228576212948/AnsiballZ_pamd.py\", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/administrator/.ansible/tmp/ansible-tmp-1565652483.5214953-86228576212948/AnsiballZ_pamd.py\", line 49, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/opt/venvs/ansible/lib/python3.5/imp.py\", line 234, in load_module\n    return load_source(name, filename, file)\n  File \"/opt/venvs/ansible/lib/python3.5/imp.py\", line 170, in load_source\n    module = _exec(spec, sys.modules[name])\n  File \"<frozen importlib._bootstrap>\", line 626, in _exec\n  File \"<frozen importlib._bootstrap_external>\", line 673, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n  File \"/tmp/ansible_pamd_payload_x6hjqy1u/__main__.py\", line 877, in <module>\n  File \"/tmp/ansible_pamd_payload_x6hjqy1u/__main__.py\", line 843, in main\n  File \"/tmp/ansible_pamd_payload_x6hjqy1u/__main__.py\", line 479, in remove\nAttributeError: 'PamdRule' object has no attribute 'prev'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

```

continue
                elif "=" in arg:
                    key, value = arg.split("=")
                    key_value_current_args[key] = value
                else:
                    simple_current_args.add(arg)
            key_value_current_args_set = set(key_value_current_args)
            new_args_to_add = list()
            
            if simple_new_args.difference(simple_current_args):
                for arg in simple_new_args.difference(simple_current_args):
                    new_args_to_add.append(arg)
            
            if key_value_new_args_set.difference(key_value_current_args_set):
                for key in key_value_new_args_set.difference(key_value_current_args_set):
                    new_args_to_add.append(key + '=' + key_value_new_args[key])
            if new_args_to_add:
                current_rule.rule_args += new_args_to_add
                rule_changed = True
            
            if key_value_new_args_set.intersection(key_value_current_args_set):
                for key in key_value_new_args_set.intersection(key_value_current_args_set):
                    if key_value_current_args[key] != key_value_new_args[key]:
                        arg_index = current_rule.rule_args.index(key + '=' + key_value_current_args[key])
                        current_rule.rule_args[arg_index] = str(key + '=' + key_value_new_args[key])
                        rule_changed = True
            if rule_changed:
                changes += 1
        return changes
    def remove_module_arguments(self, rule_type, rule_control, rule_path, args_to_remove):