Derek Mackay: Scottish finance secretary quits over messages to boy