Improve resource handling and add entropy.

Attributes of resources are now stored as an array of structs. In
particular these are the attributes:

type
id
language
size
data

There is also some attributes that are stored outside of the array,
because they are not specific to any given resource. These are:

resource_timestamp
resource_major_version
resource_minor_version
number_of_resources

The point of doing this is that we can now do things like look for
resources with specific attributes. The data is stored in an attribute
so that you can use the hash module or the new entropy module on it too.

I've added an entropy module which will operate over a given
SIZED_STRING argument or over a range of bytes. It currently truncates
the result to an integer. I need to add support for double as a
first-class type in YARA.
Merge branch 'master' into resource_name_and_entropy
Start to implement double support.

This is still a work in progress. Right now things do not work right.
For example this rule causes a problem:

rule test {
    condition:
        tests.double_sum(0.1, 1.2) >= 0.3
}

In particular, when the result of the function is pushed onto the stack
it is casted to an int64_t, which effectively truncates it.
Merge branch 'master' into resource_name_and_entropy
Fix incorrect cast.
Remove debugging statement.
Add new instructions for working with doubles.
Merge branch 'master' into resource_name_and_entropy

Conflicts:
	libyara/grammar.c
	libyara/modules/pe.c
Remove unused macros.
Add a DO_CASTS macro.
Forgot to commit this in previous one.
Implement get_double().
Merge pull request #215 from wxsBSD/resource_name_and_entropy

Improvements to PE module, entropy module and support for floating-point numbers