A long-distance train crashed into the rear car of a stopped commuter train outside Jakarta, killing at least 14 people.