Added DeviceTask trait. Moved the casts processing directly to GL module.
Moved the device module into its own crate