Merge pull request #1511 from lamblin/fix_1499

Use compat.python2x.all instead of numpy.all on generator
Merge pull request #1514 from lamblin/fix_1510

Use half_nbits floats instead of nbits. fixes gh-1510
Try to preserve order in headers/includes/dirs/...
Add init_code mechanism to register code in module init fn
Move header and init_code from DynamicModule to Scalar
Fix other docstrings.
Add comment
Mention the need to call `import_array();` if type depends on numpy