Tesla secures loan from Chinese banks for Shanghai factory