This adds an API call allowing for unregistration to include destruction
of private data that is not managed by the flashdev framework. This also
updates the existing consumers of flashdev to use the new private data
destructor callback.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The page size ioctl requires an int pointer to retrieve the page size.
The test currently uses a size_t which mostly works fine for systems
where size_t and int are the same size, but can leave junk data in the
upper bits when they differ in size causing an assert in the test to
fail in some cases. This updates the variable to the correct type.