It's very, very easy to reset your iPhone to it's default state, you simply plug it in to your computer, and click "Restore" in iTunes. Apple doesn't have to know anything :-) I think you would have to be very silly to send a jailbroken iPhone to Apple to be serviced if Apple claim it's "illegal" to do so.