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'm not sure this loop is needed here. Given the integrity restrictions on the database, there is no way that we can get duplicate sample ids, so this loop will never be executed.
In the original code, this was needed because the sample and prep templates where the ones from the old site that have not been fixed to fulfill the requirements of the current database. In fact, this code was used to fix them