Poor quality photographs taken by Police Scotland of people they arrest could lead to crimes not being solved in the future, a report has warned.