Efficient universal programmable quantum measurements