Tesla Motors has confirmed that it has reached a settlement with former CEO Martin Eberhard to end a legal dispute.