Adding qiime map file

This adds the creation of the qiime mapping file (combination of prep/sample template) at the when the prep template is added. Note that the code is ready for review, it tests pass, but we should merge https://github.com/biocore/qiita/pull/677 first. 
I don't see any specific test for this. In case I missed it, how did you manage to add duplicate sample IDs on the database? If this is happening, we may have another bug that we should fix...