Minor refactor of cooked_post_processor.rb to improve CodeClimate score

Added instance variable @elems which contains html element/tag/attribute tuples
Used @elems to eliminate duplicate code in keep_reverse_index_up_to_date
and in optimize_urls methods