As long as the RN doesn't bring the pirates onboard a RN ship they can't request asylum as they are not "on" British territory. Send over the boarding party and keep them onboard the ship they pirated. Escort that ship into port and turn the bastards over to the locals. Don't arrest them under international law, just detain them. Let the locals arrest them for piracy. Problem solved from the legal standpoint.
Oh wait they're worried about the moral implications. Only suggestion I have for that is to grow a set.
I wonder what would happen if say, a bunch of ex Navy guys got together and bought a small cargo ship, outfitted it with heavy machine guns, and just went tooling around down there for a couple of months?