To add some data to the other answers, a great resource is DXOMark - it has test data on a huge number of lens/body combinations. The 18-55 has no test data for the D5100 but I'm using the data here from the D7000 which has the same sensor.
Here is the Perceptual Mpix map, which provides a general overview of the perceived sharpness of the lens sampled over its range. This is an absolute measure so this is the one you need to look at when comparing between lenses.
At a glance, we can see this is not exactly a stellar performer. To find the lens's "sweet spot", however, we need to dig deeper. It may not be the best lens out there, but if you're looking to make the best of what you've got let's see what we can do.
We can look at the sharpness global map, which can give us center-sharpness or 1/3, 2/3, and edge-sharpness maps. The acutance global and field (to follow) maps are now relative indicators - these compare the lens to itself so you can't compare these maps between lenses.
At the center we see something like this :
From this you might think F/8 is fine across the range, but thankfully there are also field maps which can show you the full image sharpness at each setting.
At 18mm, F/5.6 the field map looks like this :
Sharpish in the center, but falls off to fuzz in the corners. Maybe acceptable for portraiture, but probably not what we want for still life. You said you shot the example picture at F/4 - you can only get this aperture at 24mm and below, so let's look and see what that gives us :
Eeep! Not exactly what we're after.
We know from above we'll find our best performance around F/8, so let's compare a few focal lengths :
So it's clear here that field sharpness is slightly better fully wide at 18mm, dropping off a bit to 24mm, improving again at 35mm, and then falling off at full zoom to 55mm. So, if you didn't want a new lens but wanted the sharpest full field shot from this lens you'd probably want to be shooting at 18mm, F/8 or 35mm, F/8. 18mm is probably too wide for still life and you'd need to correct for the distortion so 35mm F/8 is probably where you want to be.
For your 55-300mm lens we can go through a similar exercise and find 100mm F/8 to be the sharpness sweet-spot of that lens - shooting there would give you the best performance between both lenses as the 55-300 can be a bit sharper than the 18-55.
If you wanted a really cheap improvement and you like the 50mm focal length to work with, the Nikon 50mm F/1.8G is cheap and gives good performance at F/5.6. It's also less than half the cost of the Nikon 60mm macro and even cheaper than the 40mm macro.
It's important to note here that, when comparing lenses, the field maps are always relative indicators versus the lens's peak sharpness. The PMpix maps give a better point of comparison between lenses as they show an absolute level of sharpness. Here the field map of the 50mm and 18-55mm lens look similar, but the absolute sharpness of the 50mm is far superior when comparing the PMpix map in the first image above.