Pakistan closed Afghan, Iran borders ahead of general elections for security