Napoli have confirmed the signing of Spain defender Raul Albiol from Real Madrid on a four-year contract.