Edinburgh chosen to pilot public defender scheme