Hull City have completed the signing of Steve Harper on a free transfer after he was released by Newcastle United.