Based on one of the other answers I've had a look at Jira, which goes part of the way towards doing what I'm looking for and seems to work reasonably well, though it isn't quite as slick as I'd hoped. However, it only allows sub-tasks in the Professional and Enterprise versions; this feature is disabled by default; and you only get a single level of sub-tasks. The default reports also list top level tasks as well as sub-tasks together in a flat view, so you have to specifically create a custom report if you want to view just the top level ones.
Another feature that I intend to investigate when I get a chance is Mantis, which apparently has similar functionality. I will update here once I've tried it.