EC2 UserData encoding fix (Full version of #1698)

Based on #1698 I made the fix with an updated branch using boto:develop as base and added Unit Tests for it, including a class for Testing boto.ec2.run_instances that doesn't exist yet.