Fix build issues with GCC < 4.5

 + Space/or/Newline needed for loops with empty bodies
 + __host__ and __device__ redefined due to push/pop macros not existing on GCC < 4.5.
 + Missing #include for iterator_categories.