Tesla to spend $188M to upgrade, expand Shanghai plant