Resolved memory leak in ScriptEngineManager

Added a static hasInstace method to ScriptEngineManager and checked in
Object::~Object() for having trying to remove script from object. The
memory leaks even after destroying the ScriptEngineManager because the
instance is created again when any Object is destroyed.
Issue reported here also: http://www.cocos2d-x.org/boards/6/topics/34596
build fix for win32

srandom and random are not defined on windows (VS2012)