AP source: 49ers agree to deal with Javon Hargrave