swapfile: use ->read_iter and ->write_iter

Using ->direct_IO and ->readpage for the generic swap file
infrastructure requires all sorts of nasty workarounds. ->readpage
implementations don't play nicely with swap cache pages, and ->direct_IO
implementations have different locking conventions for every filesystem.
Instead, use ->read_iter/->write_iter with an ITER_BVEC and let the
filesystem take care of it. This will also allow us to easily transition
to kernel AIO if that gets merged in the future.

Cc: Mel Gorman <mgorman@suse.de>
vfs: update swap_{,de}activate documentation

Parameters were added to swap_activate in the same patch series that
introduced it without updating the documentation. Additionally, the
documentation claims that non-existent address space operations
->swap_{in,out} are used for swap I/O, but now we use
->{read,write}_iter.
btrfs: prevent ioctls from interfering with a swap file

There are several ioctls which can work around constraints enforced by
btrfs_swap_activate and lead to an unsafe situation. We cannot do any of
the following on an active swap file in order to avoid creating
compressed or shared extents:

- chattr -C or +c
- snapshot create
- defrag
- clone
- dedup
btrfs: add EXTENT_FLAG_SWAPFILE

Extents mapping a swap file should remain pinned in memory in order to
avoid doing allocations to look up an extent when we're already low on
memory. Rather than overloading EXTENT_FLAG_PINNED, add a new flag
specifically for this purpose.

Reviewed-by: David Sterba <dsterba@suse.cz>
btrfs: enable swap file support

Implement the swap file a_ops on btrfs.

Activation does two things:

1. Checks for a usable swap file: it must be fully allocated (no holes),
   support direct I/O (so no compressed or inline extents) and must be
   eligible for nocow in its entirety in order to avoid doing a bunch of
   allocations for a COW when we're already low on memory
2. Pins the extent maps in memory with EXTENT_FLAG_SWAPFILE

Deactivation unpins all of the extent maps.