Add support for IPv6 hop limiting

Hey Raphaël, thanks for integrating my code. Here you are a rebased version of you patch.
Cheers!

Rebase of #152 onto #207.