Israeli lawmakers have voted to dissolve parliament after Prime Minister Benjamin Netanyahu failed to form a coalition government.