Definition of impediment from Scrumology:
impediment – a hindrance or obstruction in doing something: “an impediment to progress”.
Example: Realistic Test Data:
The example you cite, the need to have more realistic data in the database, could be construed as an impediment to progress.
An impediment is not necessarily something that needs to be resolved to complete the project. Instead, an impediment is something that "impedes" or hinders your team's progress. With enough time in the budget, an impediment may not necessarily need to be resolved. It's up to you as the project manager to determine if the productivity gain from removing the impediment is worth the opportunity cost of spending time removing it.
But where goes the magical line where it becomes and internal improvement?
It's up to you as the project manager to determine where that line is. If an "internal improvement" doesn't speed up the project team's progress, then you could argue that it's not really an "impediment" and not really necessary that the issue be resolved.
Options for Handling Small Tasks:
In my experience, it's easy to let those little things distract you from the most important tasks. All too often, I've seen myself and others get lost in minor details that we tackled because they appeared to be the low hanging fruit. This led to issues later on where we scrambled to resolve the more important larger tasks.
Thus, go with option 1.
Handle all internal improvements as stories in the backlog and make the PO prioritize them.. If the tasks aren't important, push them to the bottom of the list.
Of course, if you estimate that you'll have room at the end of the sprint and the next most important task won't fit within the current sprint, go down the list and find the most important smaller task that will fit within that sprint.