Fix documentviewer package.

The dependency to openjpeg was incorrect, making the package
uninstallable.
safemode.h: make it usable from C code.
disk device manager: check that partitions are unmounted before uninitializing.

when uninitializing a partition or a disk (removing the partition
table), check that all partitions from that table are unmounted, as they
are about to become invalid.

Fixes #8827.
kernel: Workaround for double lock of spinlock in user timers.

The thread that is being [un]scheduled already has its time_lock locked
in {stop|continue}_cpu_timers(). When updating the TeamTimeUserTimer,
the team is asked for its cpu time. Team::CPUTime() then iterates the
threads of the team and locks the time_lock of the thread again.

This workaround passes a possibly locked thread through the relevant
functions so Team::CPUTime() can decide whether or not a thread it
iterates needs to be locked or not.

This works around #11032 and its duplicates #11314 and #11344.
vm_soft_fault(): Missing DEBUG_PAGE_ACCESS_END()

... in case we'd need to unmap a page that is wired.

Fixes the immediate issue of #10977. There's a problem remaining (as
discussed in comment 1): If two threads want to wire the same page at
the same time (which led to the assertion being triggered), they will
now deadlock, waiting for each other to remove the pre-registered
VMAreaWiredRange.
Add vm_page_free_etc()

It additionally gets a vm_page_reservation* argument. If not NULL, the
page count of the reservation is incremented for the freed page.
VMAnonymousCache::_MergePagesSmallerConsumer(): Add ASSERT
vm_soft_fault(): Avoid inconsistent state when seeing wired page

When we encounter a wired page that we'd have to unmap to map our newly
allocated one, we need to get rid of the latter before unlocking
everything and waiting for the wired page. Otherwise we'd leave things
in an inconsistent state (a page from an upper cache shadowing a mapped
page from a lower cache).
Debugger: Add const qualifier to JobKey object parameter.
Debugger: Add missing team lock in DebugReportGenerator.
Debugger: Add job for expression evaluation.
Debugger: Add asynchronous expression evaluation interface.

- Add UserInterfaceListener hook to request expression evaluation.
- Add corresponding events/handlers in Team and TeamDebugger.

These allow callers to request evaluation of expressions by the
debugger core's worker threads with asynchronous notifications of
results. While not strictly necessary right now, this paves the way
for further changes to come, as handling of variables will
potentially require resolving their values if they haven't been
already, and this shouldn't be done from user interface threads.
Debugger: Use async request in expression window.

- ExpressionEvaluationWindow now uses the aforementioned
  request interface to ask the debugger core to perform evaluation
  on its behalf, rather than doing so itself directly.

The remaining users of the expression evaluator will be adjusted in
following commits.
Change error code for already mounted partition to B_BAD_VALUE.

As Axel pointed out, B_BAD_DATA is not the correct code here. B_BUSY
could be used but I wantd a code different from the existing one for
"partition already being initialized".
Sounds: rework layout of window

* Remove useless BBox
* Use unicode symbols for play/stop buttons instead of a label
* Since the buttons are smaller, put them on the same line as the file
selector.
Sounds: make private methods private.
Sounds: zoom to fit instead of going fullscreen.

Fixes #5588.
Typo
vm_soft_fault(): Avoid deadlock waiting for wired ranges

* VMArea::AddWaiterIfWired(): Replace the ignoreRange argument by a
flags argument and introduce (currently only) flag
IGNORE_WRITE_WIRED_RANGES. If specified, ranges wired for writing
are ignored. Ignoring just a single specified range doesn't cut it
in vm_soft_fault(), and there aren't any other users of that feature.
* vm_soft_fault(): When having to unmap a page of a lower cache, this
page cannot be wired for writing. So we can safely ignore all
writed-wired ranges, instead of just our own. We even have to do that
in case there's another thread that concurrently tries to write-wire
the same page, since otherwise we'd deadlock waiting for each other.
vm_soft_fault(): remove unused wiredRange parameter