Automatic reuse same-property materials
I've made up this workaround:

import bpy

def find_material(material, list):
    for elem in list:
        if material.diffuse_color == elem.diffuse_color and \
           material.specular_color == elem.specular_color:
            return elem
    return False

# creates a list of unique materials
list_of_unique_materials = []
for material in bpy.data.materials:
    if material.users and not find_material(material, list_of_unique_materials):
        list_of_unique_materials.append(material)

# updates materials of each mesh
for obj in bpy.data.objects:
    for mat in obj.material_slots:
        mat.material = find_material(mat.material, list_of_unique_materials)

# removes unused materials
for material in bpy.data.materials:
    if not material.users:
        bpy.data.materials.remove(material)