of/device: Rework to use common platform_device_alloc() for allocating devices