Feature: AutoMagicCoding (NSCoding alternative) for nodes with actions.

Well, i added some AMC support to cocos2d-iphone recently.
Actions AM support not yet added, so almost everything after loading will stand still (there are some exceptions used to demonstrate some stuff tough, but it's done via starting actions after loading).

BTW i think it's pretty good way to demonstrate actual saved state after loading, so probably even after adding actions support - in old test i will stop all actions before saving to have the same photo capture effect.

Anyway, here's what i got...


What's new
===========
 
  1. Cocos2D-iPhone Sources:
       1. ADDED: cocos2d/AutoMagicCoding - AMC submodule
           TODO: remove submodule, use easier path, update all files , that uses that path.
           before adding actions amc support & merging it all - it's better to have AMC
           as a submodule - easier to maintain.    
       2. CHANGED: Many cocos2d classes, that now have AMC Support (see pull request notes).    
       3. ADDED: CCNodeRegistry - central key-value (by name string) for nodes, that
               doesn't retain nodes (Used for restoring links after loading, such as
               CCMenuItem target & other).    
       4. REMOVED: CCBlocksAdditions category & CCBlockSupport.m (only implementation file
               header is still used) - CCMenuItem was refactored a little for
               better AMC support, now blocks used directly, but it's still 
               backward compatible with old iOS versions & now you can set
               target/selector or block after creating CCMenuItem (or it's subclasses).   
       5. CHANGED: Memory footprint of ccColor3B. 3 bytes is too small. It
               should be 5 bytes at least, to avoid KVC failure (corrupted isa
               pointer & garbage value returned).   
       6. CHANGED: Templates. Removed CCBlockSupport.m, added Node Registry &
           AMC sources.   
           TODO: test XCode3 templates, i don't have XCode3, so i can't test it.   
  2. Tests:
       1. ADDED: New test target: AMCTest - includes additional tests for AMC:
           * NodeAMC - Simple node properties/hierarchy test.
           * LayersAMC - Test for CCLayer, CCLayerColor, CCLayerGradient & CCLayerMultiplex.
               (There was no Layers test before - so added new one).
           * ParallaxAMC - Test for AMC-Support CCParallaxNode with AMC-Supported children.
               (Used instead of existing test, cause it includes deprecated class children,
               that will not be supported by AMC).
           * ProgressTimerAMC - Test for CCProgressTimer AMC Support (there was no test for
               progressTimer before).
           * SceneAMC - explicit test for whole CCScene test.
       2. CHANGED: Existing tests - added save/purge/load toggle menu item. 
           * EffectsAdvancedTest - tests CCGrid AMC Support.
           * LabelTest - tests CCLabel AMC Support.
           * MenuTest - tests CCMenu & Items subclasses AMC Support & CCNodeRegistry.
           * SpriteTest - tests CCSprite, Frame, BatchNode & CCCamera AMC Support.


 
Nodes supported by AMC
=========================
  
1. Basic Nodes
       * CCNode - FULL SUPPORT
           * Children & all properties except for Camera & Grid ( tested in AMCTest.m in NodeAMC )
           * CCCamera ( tested in SpriteTest.m in SpriteZVertex )
           * CCGrid ( tested in EffectsAdvancedTest.m in Effect1, Effect2, etc... )
           * Name & CCNodeRegistry (tested in MenuTest - weak links to children & targets for menuItems)
       * CCLayer - FULL SUPPORT ( tested in AMCTest.m LayersAMC )
           * CCLayerColor ( tested in AMCTest.m LayersAMC )
           * CCLayerGradient ( tested in AMCTest.m LayersAMC )
           * CCLayerMultiplex    
2. Sprites - FULL SUPPORT (tested in SpriteTest.m - AMCTest functionality added to existing test)
       * CCSprite
       * CCSpriteFrame (key for CCSpriteFrameCache not saved yet - all SpriteFrames will be independent after loading).
       * CCSpriteBatchNode   
3. Textures - ALL NEEDED SUPPORT
       * CCTexture2D - only key for CCTextureCache saved (no custom texture support).
           As Riq said on forums: "serializing the TextureCache is sort of hackish." 
           ( http: www.cocos2d-iphone.org/forum/topic/16980#post-95815 )
           So we will save only key (filepath) for Texture, making developer responsible 
           for creating custom texture on deserialization 
           (-initWithDictionaryRepresentation: method) or saving generated texture to
           documents or cache folder & setting it's key to that path, so next time it could 
           be loaded from there.
       * CCTextureAtlas - Saves CCTexture2D (via key) & capacity (Tested in SpriteTest.m).
           (Used by CCSpriteBatchNode, so tested everywhere where BatchNode is tested.)
       * CCTextureCache - not supported - not needed. 
           (Can be saved as array of texture keys - can be useful for preloading all
           needed for scene textures)
 
4. Labels - FULL SUPPORT (Tested in LabelTest.m)
       * CCAtlasNode - FULL SUPPORT (not tested independently, but used only by CCLabelAtlas)
       * CCLabelAtlas - FULL SUPPORT
       * CCLabelTTF - MAC SUPPORT (iOS also should work, but i tested only on a Mac)
       * CCLabelMBFont - FULL SUPPORT by Magic. True magic... Tested only on a Mac, but...
           You know - i'll better just trust the Magic, cause Magic is VERY powerfull!   
5. Menus - FULL POSSIBLE SUPPORT
       * CCMenu - FULL SUPORT
       * CCMenuItem - ALL SUBCLASSES SUPPORTED:
           * CCMenuItemLabel
           * CCMenuItemAtlasFont
           * CCMenuItemFont
           * CCMenuItemSprite
           * CCMenuItemImage
           * CCMenuItemToggle   
         Target saved as name of CCNode in CCNodeRegistry, selecter saved as    
         NSString. It's impossible to save Blocks - user should manually restore   
         them after loading   
               (CCNodeRegistry can be used to obtain target nodes).   
6. More Nodes
       * CCParallaxNode - FULL SUPPORT (tested in AMCTest.m ParallaxAMC)
       * CCProgressTimer - FULL SUPPORT (tested in AMCTest.m ProgressTimerAMC)
         (btw found a bug - different acnhorPoints for radial timers aren't supported)
 
Actions supported by AMC
=================================
  
CCAction.m
--------------------
  * CCAction-------------------Supported, Tested (ActionsTest)
  * CCFiniteTimeAction----Supported, Tested (ActionsTest)
  * CCRepeatForever-------Supported, Tested (ActionsTest)
  * CCSpeed-------------------Supported, Tested (ActionsTest)
  * CCFollow-------------------Supported, Tested (ActionsTest)

CCActionInterval.m
--------------------
  * CCActionInterval--------Supported, Tested (ActionsTest)
  * CCSequence-------------Supported, Tested (ActionsTest), Issues =  #17
  * CCRepeat-----------------Supported, Tested (ActionsTest)
  * CCSpawn------------------Supported, Tested (ActionsTest)
  * CCRotateTo--------------Supported, Tested (ActionsTest)
  * CCRotateBy--------------Supported, Tested (ActionsTest)
  * CCMoveTo----------------Supported, Tested (ActionsTest)
  * CCMoveBy----------------Supported, Tested (ActionsTest)
  * CCSkewTo----------------Supported, Tested (ActionsTest)
  * CCSkewBy----------------Supported, Tested (ActionsTest)
  * CCJumpTo----------------Supported, Tested (ActionsTest)
  * CCJumpBy----------------Supported, Tested (ActionsTest)
  * CCBezierTo---------------Supported, Tested (ActionsTest)
  * CBezierBy-----------------Supported, Tested (ActionsTest)
  * CCScaleTo----------------Supported, Tested (ActionsTest)
  * CCScaleBy----------------Supported, Tested (ActionsTest)
  * CCBlink---------------------Supported, Tested (ActionsTest)
  * CCFadeIn------------------Supported, Tested (ActionsTest)
  * CCFadeOut----------------Supported, Tested (ActionsTest)
  * CCFadeTo------------------Supported, Tested (ActionsTest)
  * CCTintTo--------------------Supported, Tested (ActionsTest)
  * CCTintBy--------------------Supported, Tested (ActionsTest)
  * CCDelayTime--------------Supported, Tested (ActionsTest)
  * CCReverseTime----------Supported, Tested (ActionsTest)
  * CCAnimate-----------------Supported, Tested (ActionsTest)

CCActionTween.m
--------------------
  * CCActionTween----------Supported, Tested (ActionsTest)

CCActionProgressTimer.m
--------------------
  * CCProgressTo----------Supported, Tested (ActionsTest)
  * CCProgressFromTo---Supported, Tested (ActionsTest)

CCActionInstant.m
--------------------
  * CCActionInstant-------------Supported, Tested (ActionsTest)
  * CCShow------------------------Supported, Tested (ActionsTest)
  * CHide----------------------------Supported, Tested (ActionsTest)
  * CCToggleVisibility----------Supported, Tested (ActionsTest)
  * CCFlipX------------------------Supported, Tested (ActionsTest)
  * CCFlipY------------------------Supported, Tested (ActionsTest)
  * CCPlace------------------------Supported, Tested (ActionsTest)
  * CCCallFunc-------------------Supported, Tested (ActionsTest)
  * CCCallFuncN	-----------------Supported, Tested (ActionsTest)
  * CCCallFuncND---------------NOT-SUPPORTED (Can't save custom data)
  * CCCallFuncO-----------------NOT-SUPPORTED (Can't save custom object)
  * CCCallBlock-------------------NOT-SUPPORTED (Can't save block)
  * CCCallBlockN-----------------NOT-SUPPORTED (Can't save block)

CCActionCamera.m
--------------------
  * CCActionCamera-------------Supported, Tested (ActionsTest)
  * CCOrbitCamera---------------Supported, Tested (ActionsTest)

CCActionEase.m
--------------------
  * CCActionEase---------------------Supported, Tested (EaseActionsTest)
  * CCEaseRateAction--------------Supported, Tested (EaseActionsTest)
  * CCEaseIn---------------------------Supported, Tested (EaseActionsTest)
  * CCEaseOut------------------------Supported, Tested (EaseActionsTest)
  * CCEaseInOut----------------------Supported, Tested (EaseActionsTest)
  * CCEaseExponentialIn----------Supported, Tested (EaseActionsTest)
  * CCEaseExponentialOut--------Supported, Tested (EaseActionsTest)
  * CCEaseExponentialInOut-----Supported, Tested (EaseActionsTest)
  * CCEaseSineIn---------------------Supported, Tested (EaseActionsTest)
  * CCEaseSineOut-------------------Supported, Tested (EaseActionsTest)
  * CCEaseSineInOut----------------Supported, Tested (EaseActionsTest)
  * CCEaseElastic---------------------Supported, Tested (EaseActionsTest)
  * CCEaseElasticIn------------------Supported, Tested (EaseActionsTest)
  * CCEaseElasticOut---------------Supported, Tested (EaseActionsTest)
  * CCEaseElasticInOut-------------Supported, Tested (EaseActionsTest)
  * CCEaseBounce--------------------Supported, Tested (EaseActionsTest)
  * CCEaseBounceIn-----------------Supported, Tested (EaseActionsTest)
  * CCEaseBounceOut---------------Supported, Tested (EaseActionsTest)
  * CCEaseBounceInOut------------Supported, Tested (EaseActionsTest)
  * CCEaseBackIn---------------------Supported, Tested (EaseActionsTest)
  * CCEaseBackOut-------------------Supported, Tested (EaseActionsTest)
  * CCEaseBackInOut----------------Supported, Tested (EaseActionsTest)


Not Supported
=================================
 
1. Possible in the future releases:
     * CCParticleBatchNode & other from "Particle Nodes" - OMG, lot of iVars & structs! 
       Anyway - it should be possible, just needs time.
     * CCTMXLayer, CCTMXObjectGroup, CCTMXTiledMap. With ability to change something & it will be saved with changes. 
     * CCTransitions - Low priority feature. Easy to save, hard to test.
       Only if do first ammount of tests that saves transition & 2nd - that loads it. 
     * Effects (Grid) Actions.
     * CCRibbon  - probably hard to support 
     * CCMotionStreak - uses CCRibon.    
2. Probably not to be supported by AMC
    * CCTextureAtlas - Manual atlas not supported (last test in LabelTest)
    * CCTimer & scheduled methods. (Not used by Cocos2D-iPhone classes 
       themselves - should be used by developer expicitly ).
    * CCGrabber (helper class), 
    * CCRenderTexture (helper class), 
    * CCTileMapAtlas (DEPRECATED (Will be removed from Cocos2D-iPhone in 1.0+ )).

All issues regarding AMC support for Cocos2D-iPhone is here:
https://github.com/psineur/cocos2d-iphone/issues?labels=feature-amc+branch

Issue about "More Nodes Support": https://github.com/psineur/cocos2d-iphone/issues/19
Issue about "More Actions Support": https://github.com/psineur/cocos2d-iphone/issues/18

All basic functional of Cocos2D-iPhone is supported and stable.
AMC isn't a submodule anymore.
Probably this can be merged now.

This functionality is enough for me to start working on Editor for Cocos2D.
So i will update this Pull Request only with critical fixes, or after releasing first public version of editor.

P.S. See big comment below for additional "What's New" regarding actions support.