Joint optimization of coding mask and scan positions for compressive single sensor imaging