Fixes an error which occurs while unloading the addon. Issue #15
PMX importer: Fix textured material setup.  Don't set alpha=0.0, and use blend type 'MULTIPLY'.
PMX importer: Fix textured material setup.  Use texture coordinates 'NORMAL' for sphere maps.
PMX importer: More fixes for textured material setup.

- forgot to add support for .spa file
- .sph was supported only for .pmd file, not for pmx file
PMX importer: Code cleanup for own previous commits.  Remove .pmd specific codes from import_pmx.py.
PMX importer: Tweak the sphere map settings.

- Don't set scale=0.98 to sphere maps anymore.  Maybe scale=1.0 is better.
- Change diffuse_color_factor from 10.0 to 3.0.  10.0 seems too large.
PMX importer: Transparency was not enabled when not using texture, even if alpha or specular_alpha is less than 1.0.
PMX importer: Add options to specify influences of sphere maps.

- Default values for .sph and .spa files are 1.0 and 3.0, respectively
- The value of zero means don't use sphere maps
Cycles converter: Proper settings for color/alpha.  Also, ignore sphere maps and unused textures.
PMX importer: Enable "Receive Transparent" for all materials.
PMX importer: Add debug prints for sphere textures to pmx loader.
PMX importer: Set "Receive" and "Receive Transparent" according to enabled_self_shadow.
PMX importer: Set "Cast Buffer Shadows" according to enabled_self_shadow_map.

When importing a pmd model, disable buffer shadows if material is alpha=0.98.
This change doesn't affect the ray shadows, so makes no sense in most cases.
PMX importer: Add option to specify if textures use MIP maps.

This avoids the issue that strange purple color may appear if a texture has 100% transparent areas.
However, disabling the MIP maps can cause the other problems, so this option defaults to ON.
Merge pull request #17 from iRi-E/master

PMX importer: Sphere map support and fixes for material setup.
Cycles converter: To simplify, use material.texture_slots[j].use rather than material.use_textures[j].
Render setup: Use display device "None" in the "Shadeless" settings.  Also change the default value of spa_blend_factor option in PMX importer to 1.0.
Merge pull request #18 from iRi-E/master

Small improvements for own previous request #17.
Merge branch 'master' into 0.5.0-dev

Conflicts:
	mmd_tools/__init__.py
	mmd_tools/cycles_converter.py
	mmd_tools/import_pmx.py
fix wrong merge.
repair pmd loading.