Refs: http://code.google.com/p/capirca/issues/detail?id=28 http://code.google.com/p/capirca/issues/detail?id=29
Refs:
http://code.google.com/p/capirca/issues/detail?id=28
http://code.google.com/p/capirca/issues/detail?id=29

Fix rendering bugs in JuniperSRX generator and refactoring code:
- Protocol was improperly rendered in the term rather than under
  application{} section.  
- Terms with both src and dst ports improperly
  rendered as distinct apps rather than restrictions on individual app entry
  (AND instead of OR)
- Refactor applications rendering code.


dagmartin/capirca,google/capirca,sneakywombat/capirca,azet/capirca,jayceechou/capirca,s3u/capirca,sneakywombat/capirca,rarcotvmw/capirca,jayceechou/capirca,dagmartin/capirca,ryantierney513/capirca,rarcotvmw/capirca,google/capirca,rarcotvmw/capirca,google/capirca,s3u/capirca,pettai/capirca,sneakywombat/capirca,ryantierney513/capirca,ryantierney513/capirca,jethrogb/capirca,google/capirca,azet/capirca,pettai/capirca,jethrogb/capirca