Updated and cleaned up the basic machines' code

Changes: Made the code neater and easier to read, icons are now in an
array, added 1-2 null checks for safety and added hasTileEntity and
createTileEntity in BlockMachineRoot to be implemented by its
subclasses.