The average cost of a simple funeral in Scotland has reached a record high of £4,345.