Juventus fight back from two goals down to rescue a draw against Bologna as head coach Thiago Motta is sent off against his old club.