Mechanistic reconciliation of community and invasion ecology