Fix artefacts index view when need_ids is nil

This was causing 500 errors in prod.

need_ids should always be an array, but in some cases it can be nil
(often caused by Rails params_wrapper 'helpfully' converting empty array
in JSON requests to nil).
Merge pull request #167 from alphagov/fix_artefacts_index

Fix artefacts index view when need_ids is nil