Quetta police foils terror plot