Almost 250 died while homeless in Scotland last year, a rise of nearly 100 since the statistics were first recorded.