Pinning of Abrikosov vortices on dislocations and the critical current in high-temperature superconductors