European aircraft maker and Boeing rival Airbus has said it is laying off 2,500 workers as it tries to turn around its struggling defence and space division.