Staging module
One thing I miss in Drupal is a staging/testing function, to check new versions, modules, templates etc before putting it on the live server. So I'll try to write a module for this.
[First question: is someone already working on this?]
I'll give a outline of my plans here, hoping to get weak parts critizised and some questions answered.
Functionality of the module will be inspired by the method described in http://drupal.org/creating-drupal-test-sites
Scope
The module is aimed at aiding code uppgrades, like when changing from one Drupal version to another.
While smaller uppgrades (changing the theme, adding a module) also can be tested with the module, there is already quite easy to do this kind of staging with the functions built in to Drupal - like the possibility to show different themes to different visitors and the support for multiple sites on the same code base.
Content staging is probably out of scope for this module (it's a different kind of problem, dealing with how to syncronize the new content with the stuff that has occured on the live site while it was created).
Test
* The module will (optionaly) make a new empty database, and make copy of the database. The "cache" table of the copy will be emptied. [Are there other tables that needs to be omitted, emptied or in other ways manipulated?]
* It will also (optionaly) make a copy of the Drupal installation. In the process, some changes will be made to "settings.php", so that it points to the right database. [Can PHP copy and manipulate files in the file system, or is this blocked for security reasons?]
Deployment
When the testing is done, it's time to deploy the new version.
The module will delete the old Drupal installation, and replace it with the test installation. No changes will be made to "settings.php" - i.e. the staging/testing database will become the new live database. (There are some obvius drawbacks with this method - content, comments, statistics etc from the live site that has been added since the test started will be lost, so this has to be made smarter in a later version of the module.)

Multi-site has most of the functionality
As so often with Drupal, I discovered that the features I was missing already existed, I just had not found them yet.
In this case the multi-site feature (http://drupal.org/node/43816) was more powerful than I had understod. It is possible to have both separate sets of modules and separate themes in different sites, making it easy to test changes in these.
The only thing the multi-site is not suitable for, is testing a change in codebase (since all the sites are using the same), for example an upgrade from 4.6 to 4.7. But since these upgrades are quite rare, I will use the manual method outlined in http://drupal.org/creating-drupal-test-sites.
I also use that method from time to time to make my staging database somewhat in synch with the content of the live database.