European politicians have voted to make it easier to send rejected asylum-seekers to detention sites in third countries.