mingw: Fix compilation issues

- use lowercase windows.h
- fix for mingw32 using preprocessor-unfriendly definition of CLOCKS_PER_SEC
builtinimport: Fix comment orphaned by one of previous commits.
builtinimport: Fix broken namespace imports due to dup vstr_cut_tail_bytes().
py: Improve handling of memory error in parser.

Parser shouldn't raise exceptions, so needs to check when memory
allocation fails.  This patch does that for the initial set up of the
parser state.

Also, we now put the parser object on the stack.  It's small enough to
go there instead of on the heap.

This partially addresses issue #558.
py, lexer: Add allocation policy config; return NULL if can't allocate.
stmhal: Improve handling of out-of-memory in REPL.

Addresses issue #558, but it's likely that other out-of-memory errors
could crash the pyboard.  Reason is that qstrs use m_new and can raise
an exception within the parser.
objstr: Implement .lower() and .upper().
Merge branch 'master' of github.com:micropython/micropython
py, emitters: Fix dummy_data size for bytecode and thumb.

Thumb uses a bit less RAM, bytecode uses a tiny bit more, to avoid
overflow of the dummy buffer in certain cases.

Addresses issue #599.
py: Compress a little the bytecode emitter structure.
stmhal: Fix USB CDC not flushing packets when an exact multiple of 64.

Need to send a zero-sized packet after sending an exact multiple of 64
bytes (not just after sending 64 bytes exactly).

Addresses issue #494, part 2.
tools: Move gendoc.py to tools, and make it a little more generic.
objnamedtuple: Support iteration.
py: Make mp_obj_print() handle null object w/o segfault if debug build.

Happens regularly when used for debugging.
objtype: Implement ->getiter() method for instances.

Includes support for native bases.
objtype: Comments for duplicating code in runtime.c.
py: Fix prefix on few sequence helpers, was incorrectly "mp_".
objlist: Implement non-growing slice assignment.

Slice value to assign can be only a list so far too.
objlist: Support list slice deletion.
stmhal/cc3k: Remove spaces and tabs at end of lines.