Gordon Brown says allowing Gurkhas to settle in the UK would cost too much as MPs express outrage during a cross-party debate.