Funeral expenses and inheritance tax liabilities in the UK have pushed the cost of dying to nearly a quarter of a million pounds.