Lohan will go to rehab as part of plea deal