Britain risks global irrelevance unless it rebuilds its military and meets Nato defence spending commitments, Poland’s foreign minister has warned.