React 04 compatible

I think this is ready to be tagged as 0.4.0 (to be consistent with current version of phpreact).

Further optimizations/refactoring to be done in later versions.