Thousand of children in Scotland are experiencing homelessness and the detrimental impact it is having on them has been revealed in a new report.