Independent hospices will receive a total of £9.4m from the Scottish Government to support palliative care.