A boundary integral method for computing the dynamics of rigid pJournals in unsteady Stokes and viscoelastic medium