COAS Kayani pays farewell visit to Naval Headquarters