Fix database upgrade with plugin promoted to base
Fix database upgrade with plugin promoted to base

When a system that has plugin X enabled gets upgraded to a version where
plugin X has been promoted to be a base plugins (i.e. a symlink in
baseplugins/), `rake db:migrate` would blow up with

  Multiple migrations have the version number 12345678901234

Note that we probably don't need to do this deduplication everywhere
else, because the Ruby $LOAD_PATH already works by giving prioriry to
the first path that is found.

blogoosfero/noosfero,alexandreab/noosfero,tallysmartins/noosfero,AlessandroCaetano/noosfero,hebertdougl/noosfero,coletivoEITA/noosfero,larissa/noosfero,evandrojr/noosfero,samasti/noosfero,vfcosta/noosfero,EcoAlternative/noosfero-ecosol,uniteddiversity/noosfero,tallysmartins/noosfero,AlessandroCaetano/noosfero,blogoosfero/noosfero,blogoosfero/noosfero,CIRANDAS/noosfero-ecosol,arthurmde/noosfero,blogoosfero/noosfero,samasti/noosfero,macartur/noosfero,marcosronaldo/noosfero,blogoosfero/noosfero,coletivoEITA/noosfero-ecosol,evandrojr/noosferogov,samasti/noosfero,evandrojr/noosfero,marcosronaldo/noosfero,coletivoEITA/noosfero-ecosol,vfcosta/noosfero,coletivoEITA/noosfero,larissa/noosfero,coletivoEITA/noosfero,LuisBelo/tccnoosfero,AlessandroCaetano/noosfero,arthurmde/noosfero,tallysmartins/noosfero,macartur/noosfero,evandrojr/noosfero,uniteddiversity/noosfero,arthurmde/noosfero,blogoosfero/noosfero,hebertdougl/noosfero,macartur/noosfero,coletivoEITA/noosfero,hebertdougl/noosfero,marcosronaldo/noosfero,alexandreab/noosfero,coletivoEITA/noosfero-ecosol,larissa/noosfero,vfcosta/noosfero,samasti/noosfero,arthurmde/noosfero,evandrojr/noosferogov,alexandreab/noosfero,abner/noosfero,tallysmartins/noosfero,uniteddiversity/noosfero,evandrojr/noosferogov,LuisBelo/tccnoosfero,uniteddiversity/noosfero,samasti/noosfero,LuisBelo/tccnoosfero,larissa/noosfero,vfcosta/noosfero,uniteddiversity/noosfero,EcoAlternative/noosfero-ecosol,tallysmartins/noosfero,hebertdougl/noosfero,CIRANDAS/noosfero-ecosol,arthurmde/noosfero,uniteddiversity/noosfero,hebertdougl/noosfero,EcoAlternative/noosfero-ecosol,AlessandroCaetano/noosfero,vfcosta/noosfero,abner/noosfero,larissa/noosfero,evandrojr/noosfero,hebertdougl/noosfero,EcoAlternative/noosfero-ecosol,abner/noosfero,abner/noosfero,CIRANDAS/noosfero-ecosol,tallysmartins/noosfero,alexandreab/noosfero,AlessandroCaetano/noosfero,evandrojr/noosfero,marcosronaldo/noosfero,uniteddiversity/noosfero,samasti/noosfero,EcoAlternative/noosfero-ecosol,evandrojr/noosferogov,evandrojr/noosfero,coletivoEITA/noosfero,evandrojr/noosferogov,evandrojr/noosferogov,abner/noosfero,marcosronaldo/noosfero,vfcosta/noosfero,tallysmartins/noosfero,abner/noosfero,LuisBelo/tccnoosfero,abner/noosfero,coletivoEITA/noosfero,larissa/noosfero,AlessandroCaetano/noosfero,evandrojr/noosfero,marcosronaldo/noosfero,EcoAlternative/noosfero-ecosol,coletivoEITA/noosfero-ecosol,alexandreab/noosfero,coletivoEITA/noosfero-ecosol,blogoosfero/noosfero,marcosronaldo/noosfero,EcoAlternative/noosfero-ecosol,alexandreab/noosfero,evandrojr/noosferogov,arthurmde/noosfero,macartur/noosfero,coletivoEITA/noosfero,LuisBelo/tccnoosfero,AlessandroCaetano/noosfero,CIRANDAS/noosfero-ecosol,LuisBelo/tccnoosfero,macartur/noosfero,larissa/noosfero,coletivoEITA/noosfero-ecosol,macartur/noosfero,hebertdougl/noosfero,macartur/noosfero,arthurmde/noosfero,alexandreab/noosfero,CIRANDAS/noosfero-ecosol