Cleaner material handling

_materials was never actually being assigned to. _materials_ref_count
now counts how many times a material has been used in the scene and
removes it from itself and the web worker if the last object a material
is associated with gets removed. Before physijs materials never got
removed from the web worker.