build.py: forward -D to idf.py, share example selection with code_size (#4161) Fixes #4155. Fixes #4156.