This moves the filter_formats and get_format_list functions to a common file. These functions were roughly the same, with an optional filtering in some tests for testing mipmaps. Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>