deposit: InvalidDepositionType handling

* Handles the InvalidDepositionType exception being raised when
  trying to initialize a deposition type on older submissions which
  is disabled via the DEPOSITION_TYPES config variable.

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: Holding Pen previous/next robustness

* Makes the previous/next object getter more robust.

* Adds unit tests for this functionality.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>