Shadow Chancellor John McDonnell has vowed the Labour Party will fight to protect the rights of EU citizens living in the UK and British citizens living in the EU.