European member states have voted for new legislation to modernise the inspection system in pig slaughterhouses.