Legal office in historic Sunderland building to become student accommodation