Law to counter foreign interference in Singapore to take effect from 7 July