Pakistan's powerful army has been authorised to intercept calls and messages or to trace calls through any telecoms system, following a new law.