Add on_delete parameter passed through to 'to' ForeignKey relationship.

We have an application where we have a number of input files uploaded through a web interface.  These input files can be processed in any combination to produce an intermediate file.  Several intermediate files can be created from the same set of input files in a different order/using different processing options.

An intermediate file is used as input to a second stage of processing to output another file.  There are 3 processing stages in all and each can be repeated with different options for the same files.  It is a requirement that input files cannot be deleted if they have been processed to create an output file.  This is possible for the second process onwards through a simple foreign key relationship with on_delete set to models.PROTECT.  This pull request adds that capability to many to many relationships.