Pakistan will go to any length to ensure regional stability: COAS