US regional grocer Great Atlantic & Pacific Tea Co (A&P) has reported a sharp rise in quarterly net profit, helped by cost-cutting measures.