In a historic move, the Greek parliament has voted to hold a referendum on a proposed European bailout.