lib/serial: Add API for checking if serial is supported, listing devices