demos: Unify cmd arg handling between cube and tri.

Add --c (frame count) handling to tri to improve testability and
to bring it up to par with cube.
Fix exit code return in both cube and tri for Windows.

Change-Id: I27516b9fc0d13f25f5511ab159a80159c2550237
2 files changed