Electronic device manufacturer Foxconn has signed a contract to build autonomous electric tractors for a California startup.