Gsoc 2014 message carbons

Please review the message carbons implementation.
@shambhuprasad58 : Yes, your high-level test suite (in `ejabberd_tests`) is great. Here, I was thinking more along the lines of breaking up the `check_and_forward` function to do something like:

``` erlang
check_and_forward(JID, To, #xmlel{name = <<"message">>, attrs = Attrs} = Packet, Direction) ->
  case classify_packet(JID, To, Packet, Direction) of
    ignore -> stop;
    forward  -> send_copies( ... );
     _ -> ??? 
end,
```

The above is just a rough sketch. Perhaps not all four arguments actually need to be passed to `classify_packet`. But this gives us a way 'into' the logic of the module. You could then proceed with unit tests testing that for this-and-this message, `classify_packet` will return `ignore`, and for another message it will return `forward`. Hopefully you get the drift.

That way you can thoroughly test the module's logic without having to start the entire server.
You could put the tests in a local test suite for the module, or an eunit `*_test.erl` file. Please try things out and see what works and looks nice.

**Extra challenge** : If you can pull off the above, try to utilize [proper](https://github.com/manopapad/proper) properties to verify the function behaves as  expected for some range of randomly-generated message elements. (You'll have to write the appropriate `#xmlel` generators yourself)

Good Luck!!!