cpp11-migrate: Fix crash in AddOverride due to template instantiations

This patch fixes different issues:
- override is not added in template 'contexts' (this will be further improved
  to handle safe situations, a test for this has been written already)
- the main file is now checked before the modifications are applied
- override is not applied now when dealing with pure methods since it was
  misplaced (ignoring it isn't the perfect solution but it seems difficult to
  find the location just before the pure-specifier)

Fixes PR15827

Author: Guillaume Papin <guillaume.papin@epitech.eu>



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@181596 91177308-0d34-0410-b5e6-96231b3b80d8