check for number of available sources when determining where to apply patches

This fixes a hard crash when patch files are listed with an empty list of source files:

```
ERROR: test_patch_step (__main__.EasyBlockTest)
Test patch step.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/kehoste/work/easybuild-framework/test/framework/easyblock.py", line 529, in test_patch_step
    self.assertErrorRegex(EasyBuildError, '.*', eb.patch_step)
  File "test/framework/utilities.py", line 61, in assertErrorRegex
    call(*args, **kwargs)
  File "easybuild/framework/easyblock.py", line 1275, in patch_step
    beginpath = self.src[srcind]['finalpath']
IndexError: list index out of range
```
please cleanup the code above while you're at it
start with documenting the expected behaviour wrt `source`, `sourcepath` and `copy` (it's hard to see if the current code is just legacy patchwork or real intentional behaviour)

this is the current code:
```python
srcind = patch.get('source',0)
srcpathsuffix = patch.get('sourcepath', patch.get('copy',''))
copy = 'copy' in patch and not ('sourcepath' in patch)
```