Prime minister fends off his first no-confidence ballot and pushes through spending plans