The Scottish National Party's former chief executive, Peter Murrell, has admitted embezzling about £400,000 of party funds to fund a lavish lifestyle.