Malaysia’s attorney-general has cleared the prime minister, Najib Razak, of any criminal offences or corruption, closing investigations into a murky, multi-million-dollar funding scandal that Najib’s opponents had hoped would bring him down.