Immigration boosts economies but can cause social tensions and security concerns, the IMF has said.